Commit Graph

31 Commits

Author SHA1 Message Date
Jordan Webster
6911b9e41b status: enable rust status by default in tests
Summary: And disable it for tests that fail. We can fix these tests incrementally moving forwards.

Reviewed By: DurhamG

Differential Revision: D37952660

fbshipit-source-id: 454d8cc6db1ea5a1ec2ceadf047dc1b62744c484
2022-08-03 13:12:34 -07:00
Jun Wu
ccf430e2bd test-fb-hgext-treemanifest*: enable segmented changelog
Summary:
Exchange messages are changed.  Revlog-related logic (debugdata) is removed.
Some revision numbers are changed to more robust revset expressions.

Reviewed By: jordanwebster

Differential Revision: D38233266

fbshipit-source-id: 33d4a0832aae56d17428adbc99a596f4649b5b40
2022-07-29 00:18:14 -07:00
Durham Goode
ed053ac5fd remotefilelog: simplify repo.prefetch
Summary:
The old code had support for patterns, matcher options, and a matcher.
Most of that was never used, and all of it can be expressed via a matcher, so
let's simplify the interface to just contain a matcher.

Also, the old code had a notion of force fetching from the server. This was an
artifact of the old way history worked, where we may need to overwrite local
history with remote history. This is no longer required, since we now adjust
link revs. Let's remove it too.

Reviewed By: quark-zju

Differential Revision: D35033073

fbshipit-source-id: b204ebd30cb1bae7caa0030d6672f415caeb4353
2022-03-24 10:21:30 -07:00
Jun Wu
e41d5cd495 changegroup: drop "added x changesets with y changes to z files" message
Summary:
Our current `hg pull` in production typically shows:

  % hg pull
  pulling from mononoke://...
  connected to ... session ...
  imported commit graph for ... commits (1 segment)

There is no "added x changesets ..." message. Drop it from tests.

This also makes it easier to migrate tests to remotefilelog repos, since
with remotefilelog it will show "0 changes to 0 files".

Differential Revision: D32570597

fbshipit-source-id: aa660e2cbd9bc07caa74f0126e152589b08e5c57
2021-12-14 22:16:15 -08:00
Durham Goode
e9e0539cc1 filepeer: disable use of filepeer by default
Summary:
We want to remove filepeer as part of removing server logic in the
client. To start with, let's disable it by default and only enable it in tests
that need it. The next step will be to update those tests.

Reviewed By: quark-zju

Differential Revision: D30977765

fbshipit-source-id: c56016f017e894a15bf43fb7a8d3a0a417663ad9
2021-09-22 18:03:29 -07:00
Durham Goode
3e589d86c6 manifest: remove left vs right store during tree diff
Summary:
The diff algorithm kept track of left vs right stores, and applied the
left vs right tree lookups to the appropriate store. In reality we only ever
have one store, so we're just wasting cycles doing two sequential lookups. Let's
just get rid of the distinction.

Reviewed By: andll

Differential Revision: D30553726

fbshipit-source-id: 72de95d298dad71dc04728d5140b4d489073a33c
2021-08-25 23:32:57 -07:00
Durham Goode
1183f14f11 treemanifest: disable flatcompat by default
Summary:
This was a hack to allow the tests to produce the same hashes as
before. Let's disable this and fix the remaining test failures. A future diff
will remove the feature entirely.

Where possible I changed input hashes to desc() and output hashes to globs so
hopefully future hash changes are a little easier.

Differential Revision: D29567762

fbshipit-source-id: cf5150c112c56b08f583feba80e5a636cc07db0a
2021-07-13 15:04:57 -07:00
Durham Goode
9014a85e66 tests: fix test-fb-hgext-treemanifest-prefetch.t on Mac
Summary:
The recent treemanifest refactors broke this. The behavior seems
different on Mac vs others, so let's just make the output optional with (?).

Reviewed By: singhsrb

Differential Revision: D29565879

fbshipit-source-id: 35457a6d38b02b802cc0f98d31dcab38711ff1fe
2021-07-06 13:55:31 -07:00
Durham Goode
954fa919ac treemanifest: make ondemandfetch the default
Summary:
All our clients fetch with ondemandfetch set to true. Let's enable it
by default and remove the other fetch path.

Reviewed By: quark-zju

Differential Revision: D29148507

fbshipit-source-id: ea348aedba495d9d3a8652c4289178c08dae2f08
2021-07-01 09:31:15 -07:00
Durham Goode
1ecd0244f3 treemanifest: support designatednodes in python server
Summary:
All our client fetches now use the designatednodes api call. Let's
support it on the treemanifest python server so we can simplify the client code
around this one way of fetching.

Reviewed By: quark-zju

Differential Revision: D29148505

fbshipit-source-id: 22a92cdcfb105d8861b590de683e1bc12618abae
2021-07-01 09:31:15 -07:00
Durham Goode
8fb6b52ac1 treemanifest: move test server logic to separate extension
Summary:
The treemanifest store and pull/push logic is overly complicated.
Untangling it is a bit tricky since it needs to support both server and client
use cases. Since we no longer care about the server code except for tests, let's
copy the treemanifest extension and use it for the server repo in tests.

A future diff will take advantage of this to delete all the server logic from
the main treemanifest extension.

Reviewed By: quark-zju

Differential Revision: D29115069

fbshipit-source-id: 8b7080aa6c7de77be058b34baad5e976cd7c1acf
2021-07-01 09:31:15 -07:00
Meyer Jacobs
b489f6b1c8 tests: modify tests to exercise non-packfile configuration
Summary:
Remove packfile-specific parts of tests and modify them to test without depending on packfiles where possible.

Currently debugindexedlogdatastore and debugindexedloghistorystore appear to be broken, and debugdumpindexedlog just dumps the raw indexedlog contents, without any semantic information, so for the time being I've simply removed most packfile inspection.

Reviewed By: DurhamG

Differential Revision: D29099241

fbshipit-source-id: 86c4f9c83520374560587b8bec5c569d9c5c6510
2021-06-18 17:39:52 -07:00
Durham Goode
9c1b611dff indexedlog: make writing to indexedlog the default
Summary:
We've rolled both of these out to 100%. Let's make this the default so
we can delete those configs.

Reviewed By: quark-zju

Differential Revision: D26233645

fbshipit-source-id: cd7a08c404483f78ab714763870f5bf0fa801e7a
2021-02-11 09:34:55 -08:00
Jun Wu
bc803f49de tests: fix test-fb-hgext-treemanifest-prefetch.t
Summary:
The test is broken in master.  I might be using a stale binary running that
test in D26245424 (1392673a95). Revert the test to before D26245424 (1392673a95) fixes it.

Reviewed By: sfilipco

Differential Revision: D26321855

fbshipit-source-id: 4ada61211d3b354ae6f94f7fc8364f4550e9aeb8
2021-02-08 13:09:33 -08:00
Jun Wu
1392673a95 smartset: add nameset fast paths
Summary:
For `nameset OP baseset` or `baseset OP nameset`, convert baseset to nameset
automatically for fast paths. This is motivated by a slow query in pushrebase:

    # pushrebase/__init__.py:validaterevset
    if onto != donotrebasemarker and onto in repo:
        rebased = list(repo.set("(successors(%r) & ::%s) - %r", revset, onto, revset))
        if rebased:
            raise error.Abort(
                _("commits already rebased to destination as %s")
                % ", ".join(str(c) for c in rebased)
            )

Depending on the complexity of `revset`, `successors(revset) & ::onto` might
generate a filterset that is very inefficient - iterating through a large set `::%s`.

Optimize them by using the Rust nameset for calculations.

Before:

  In [4]: repo.revs("(successors(1001) & ::1000) - 1000")
  Out[4]: <filteredset <filteredset <baseset+ [1001]>, <nameset- <spans [06b96ec2a8b60d984606f36c30d3dbc899d804df:e890940eb1c34a06967bb9e38a0317ad7a0eb518+0:1000]>>>, <not <baseset [1000]>>>

After:

  In [1]: repo.revs("(successors(1001) & ::1000) - 1000")
  Out[1]: <nameset+ <spans []>>

This can change the ordering of sets. Therefore some test changes.

Reviewed By: DurhamG

Differential Revision: D26245424

fbshipit-source-id: 2e3ab891c586bb80cf947fff4bbdcd453c01ae70
2021-02-05 10:50:14 -08:00
Jun Wu
9bf6b674a6 config: use Rust graph render as default
Summary: Change the legacy Python graph render to Rust renderer.

Reviewed By: DurhamG

Differential Revision: D24317802

fbshipit-source-id: 4c3dc3a6dd02b7ebe79596a8e77f4b6b139d2e20
2020-10-19 17:07:30 -07:00
Jun Wu
1ce0eea5dc tests: remove some uses of rev numbers in templates
Summary: Done by `sed`.

Reviewed By: singhsrb

Differential Revision: D24173576

fbshipit-source-id: f1d042b3da7f9b64e0e40b19317364e5cb9ae946
2020-10-07 21:22:58 -07:00
Durham Goode
ddf3eeb94a treemanifest: fix fetching trees with Rust store
Summary:
The bfs fetching path in Rust was broken because it directly called
getdesignatednodes. getdesignatednodes returns False if it wasn't able to
succeed, so we need to be able to fall back in that case. The _prefetchtrees
function is meant for that, so let's just call that.

Reviewed By: singhsrb

Differential Revision: D24090946

fbshipit-source-id: d16c2c8f80f690a22046385f0e95785996a62949
2020-10-02 18:51:11 -07:00
Durham Goode
c80cdf1f49 treemanifest: enable treemanifest.useruststore=True for most tests
Summary:
The remaining test failures are mostly around bundle support, which
I'll fix in a later diff.

Reviewed By: quark-zju

Differential Revision: D23664037

fbshipit-source-id: 2bdde3cb4fcded6e0cf3afdc23269662544821df
2020-09-24 09:46:59 -07:00
Jun Wu
0562c1220f tests: enable template-new-builtin
Summary: This makes tests depend less on revision numbers.

Reviewed By: DurhamG

Differential Revision: D22468669

fbshipit-source-id: 74a06930faa3e6ee9d246ecc718c2a3740f57a54
2020-07-20 17:27:53 -07:00
Jun Wu
f6d838bc0e extensions: enable lz4revlog by default
Summary: Some native code (ex. RevlogIndex) only knows the lz4 format.

Reviewed By: DurhamG

Differential Revision: D22368825

fbshipit-source-id: d33cee235e3aa4fbf2cfb441319e3c12728d8b5b
2020-07-14 14:33:43 -07:00
Jun Wu
6fd6454502 tests: enable narrow-heads for test-fb-hgext-treemanifest-*
Reviewed By: DurhamG

Differential Revision: D22130166

fbshipit-source-id: dcff8bd6263c5cb6dd1f19320969f1d202b5da67
2020-07-02 13:22:28 -07:00
Jun Wu
6554961897 tests: replace 'phase --public' with 'debugmakepublic'
Summary: This makes narrow-heads migration smoother.

Reviewed By: ikostia

Differential Revision: D22052478

fbshipit-source-id: 83047ad6da4de2034c917bfd5be47a2f32d5cc3d
2020-06-29 11:29:04 -07:00
Jun Wu
ff888f03a6 repair: remove "saved backup bundle to" message
Summary:
The code path printing that message is rarely used in production setup.  This
makes transition to mutation easier.

Reviewed By: sfilipco

Differential Revision: D21913595

fbshipit-source-id: 3aa22575c11e38dbb7d4c4cbc7aad8dde2e755ed
2020-06-10 19:29:54 -07:00
Xavier Deguillard
36ff5d6a7d remotenames: fix expaths
Summary: We need to encode/decode utf8 when reading/writing to the hgrc file.

Reviewed By: DurhamG

Differential Revision: D20286068

fbshipit-source-id: b1d6828fb62a83ad22414de6883004411f302142
2020-03-06 10:29:32 -08:00
Zeyi (Rice) Fan
92f6f35e7a mark all tests requiring Python 2
Summary:
This diff marks **ALL** mercurial tests requiring Python 2 feature.

After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed.

To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example:

```
HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests
```

or

```
HGTEST_FORCE_PY2=1 python run-tests.py
```

----

Basically this diff are created with the following commands:

```
$ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py
$ sed -i '1s/^/#require py2\n/' test-*.t
$ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list)
# manually adding feature requires for these Python tests.
```

(Note: this ignores all push blocking failures!)

ignore-conflict-markers

Reviewed By: singhsrb

Differential Revision: D19655148

fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
2020-01-30 18:49:21 -08:00
Jun Wu
ba2d83b3f8 pull: remove "new changesets" message
Summary:
Reverts https://www.mercurial-scm.org/repo/hg/rev/eb586ed5d8ce.

The colon syntax (x:y) is deprecated and is unsupported by segmented changelog.

Reviewed By: DurhamG

Differential Revision: D19394101

fbshipit-source-id: 8c66756f1035ab7660180716a2afa052879f384e
2020-01-14 21:02:27 -08:00
Xavier Deguillard
38139a9785 tests: make file fetching messages optional
Summary:
The Rust ContentStore will not print these, and in order to better understand
what tests are broken with it enabled, let's make them optional.

Reviewed By: quark-zju

Differential Revision: D19318848

fbshipit-source-id: 87a1da510b51adc40a0d08157925a990456d3e9c
2020-01-09 07:46:59 -08:00
Durham Goode
218c83d574 tags: remove tip tag
Summary:
In a future diff we'll be removing tags. The most prevalent tag is
'tip', which shows up in a ton of test output. Let's drop that tag first, so we
can safely update the tests before we drop tags entirely.

Reviewed By: xavierd

Differential Revision: D18995058

fbshipit-source-id: 8c63710cd4ed567ea24e32724b8660f9006a61f1
2019-12-20 16:14:19 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00