Commit Graph

24 Commits

Author SHA1 Message Date
Jun Wu
b57b6f8705 changegroup: do not print 'adding changeset X' with --debug
Summary:
The debug print abuses the `linkmapper`. The Rust commit add logic does not
use `linkmapper`. So let's remove the debug message to be consistent with
the Rust logic.

Reviewed By: DurhamG

Differential Revision: D22657189

fbshipit-source-id: 2e92087dbb5bfce2f00711dcd62881aba64b0279
2020-07-30 20:32:35 -07:00
Jun Wu
856e8ab3ef setdiscovery: reimplement findcommonheads without Python DAG deps
Summary:
Re-implement the `findcommonheads` logic using `changelog` APIs that are going
to have native support from Rust.

This decouples from revlog-based Python DAG logic, namely `dagutil.revlogdag`,
and `ancestor.incrementalmissingancestors`, unblocking Rust DAG progress, and
cleans up the algorithm to not use revision numbers.

The core algorithm is unchanged.  The sampling logic is simplified and tweaked
a bit (ex. no 'initial' / 'quick initial' special cases). The debug and
progress messages are more verbose, and variable names are chosen to match
the docstrings.

I improved the doc a bit, and added some TODO notes about where I think can be
improved.

Reviewed By: sfilipco

Differential Revision: D22519582

fbshipit-source-id: ac8cc8bebad91b4045d69f402e69b7ca28146414
2020-07-30 20:32:30 -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
24e46bb082 strip: use Rust strip for testing
Summary:
The Rust strip logic works for both revlog and segmented changelog. Use it in
tests for easier segmented changelog migration.

The old revlog strip has a lot of complexities on linkrev. Since this is only
used for testing, I avoided the complexities by just saying all linkrevs are
invalidated so we can skip the complexities of dealing with filelog or
manifest, or generating a temporary bundle and unbundling them later.

Most test changes are because we no longer strip filelogs. So unbundling
them will not add new file revisions.

`test-repair-strip.t` is removed because it is only about "Permission Denied"
cases. With the new code path file logs are not stripped and the test is not
relevant.

This does not affect hgsql as it has the Rust logic totally disabled.

Reviewed By: DurhamG

Differential Revision: D22402198

fbshipit-source-id: 1c207393f59a8a3a601cfbdf7f07534b8acf46bf
2020-07-20 17:27:52 -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
50e46cb0b3 test-fb-hgext-pushrebase: enable modern configs
Summary:
With lots of edits, mostly maintaining bookmarks, the test is compatible with
modern configs.

Reviewed By: DurhamG

Differential Revision: D22174985

fbshipit-source-id: b88cd25da36ebcde908c1b63a15f90e82d1692cb
2020-07-02 13:22:32 -07:00
Jun Wu
7ab22e23a0 test-fb-hgext-pushrebase: make it a bit more verbose
Summary: This makes it easier to see changes with modern configuration.

Reviewed By: DurhamG

Differential Revision: D22174957

fbshipit-source-id: c49f270281c06debd055435362b95509093c1e99
2020-07-02 13:22:32 -07:00
Jun Wu
064973a4ba tests: migrate some noevolution tests off revision numbers
Summary: By fix-revnum.py. This makes them easier to migrate to modern setups.

Reviewed By: DurhamG

Differential Revision: D22174963

fbshipit-source-id: 4f59685f93742305dafb3b347e5e80b92bcf0c99
2020-07-02 13:22:31 -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
49c75cfa9d debugobsolete: stop printing obsmarkers
Summary: This makes transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913599

fbshipit-source-id: 74cc0b7f0608a952eded4a40291b56b291a221e5
2020-06-10 19:29:54 -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
Jun Wu
9044ccc3da bundle2: remove 'n new obsolescence markers' message
Summary: This makes transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913608

fbshipit-source-id: b9ba470572ed68dff75104bba9dbb5c8622dcfb0
2020-06-10 19:29:54 -07:00
Jun Wu
9cd4491c02 transaction: remove summary callback
Summary:
The summary callback is only used to display "obsoleted n changesets".
Remove it to make transition to mutation smoother.

Reviewed By: sfilipco

Differential Revision: D21913597

fbshipit-source-id: e47fa9df0033d1302ffc8dfa3b9885eb75861f4b
2020-06-10 19:29:53 -07:00
Jun Wu
d1bc8e37f9 tests: remove helpers-usechg.t
Summary:
`chg` is now integrated as `#chg-compatible` by the test framework. The helper
script no longer works.

Reviewed By: markbt

Differential Revision: D21895009

fbshipit-source-id: 257ed081fbd1a6acc97afbfa2934134e389ab400
2020-06-10 19:29:37 -07:00
Xavier Deguillard
a800e3e4ce tests: enable bunch of tests
Summary: These appear to pass now.

Reviewed By: quark-zju

Differential Revision: D20954747

fbshipit-source-id: ffd4dd4dc4832ed7cf84815ff1af9dad4361b26a
2020-04-13 08:53:48 -07:00
Jun Wu
ae8f6ff8e8 tests: opt-in DUMMYSSH_STABLE_ORDER for more tests
Summary: This should help reduce test flakiness.

Reviewed By: xavierd

Differential Revision: D19872952

fbshipit-source-id: d66f6c404534b3f47903b478e3cdfdda5ed46284
2020-02-27 17:54:08 -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
Mark Thomas
4958c4e342 tests: update tests-fb-*.t to use new tinit features
Reviewed By: quark-zju

Differential Revision: D19457679

fbshipit-source-id: d1010f0d2eee69ecdee5c3feba772bd3684d4cec
2020-01-20 02:45:17 -08:00
Mark Thomas
b654a9aae5 tests: use disable treemanifest in place of setconfig
Summary: Use `disable treemanifest` in place of `setconfig extensions.treemanifest=!`

Reviewed By: quark-zju

Differential Revision: D19457678

fbshipit-source-id: 47c8b3c4f4ed5cfc97275ca67afab4a86ffe7f0d
2020-01-20 02:45:15 -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
Durham Goode
9778811573 tags: remove tags feature
Summary:
We no longer user tags in any of our repositories, so let's delete all
the code and remove some tech debt.

Previously drawdag was our last remaining use of tags, but in a previous diff I
switched that to use bookmarks.

Reviewed By: quark-zju

Differential Revision: D19042226

fbshipit-source-id: d7871c71c1026599aa70fdd806418347ea214a8a
2020-01-07 12:31:10 -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