Commit Graph

10 Commits

Author SHA1 Message Date
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
e1851aaab7 treediscovery: remove treediscovery
Summary:
It has been long replaced by setdiscovery. This removes another dependency on
`dagutil.revlogdag`.

Reviewed By: DurhamG

Differential Revision: D22519585

fbshipit-source-id: ee261173ba584ffcb3371ec640b233609aafcf77
2020-07-30 20:32:30 -07:00
Jun Wu
5c567018c8 tests: enable narrow-heads for more tests
Summary: Migrate more tests to use narrow-heads.

Reviewed By: DurhamG

Differential Revision: D22130171

fbshipit-source-id: 92a1b1dc237a7f66b4430ef680d1a2f60e715778
2020-07-02 13:22:28 -07:00
Durham Goode
49ac0401b7 discovery: go back to random sampling but include master
Summary:
An earlier change (D21394302) made discovery sampling use the most
recent commits. This ended up not being correct since if the requested sample
did not find any hits then the unknown set would not be reduced and the next
requested set would not change, resulting in an infinite loop.

The goal of the original diff was to ensure master was in the initial sample set
so we didn't have to inspect a bunch of really old commits. Let's go back to
random sampling, but manually insert master into the initial set.

In the long-term we should throw away all this code and use something similar to
discovery.fastdiscovery instead which just relies on the public heads.

Reviewed By: quark-zju

Differential Revision: D21577331

fbshipit-source-id: d738de255e292fc569eb27f250dcd3eaafaaae43
2020-05-15 19:03:29 -07:00
Durham Goode
1da0256921 discovery: use the latest commits for discovery instead of random ones
Summary:
When doing discovery, for repos with long master lines and infrequent
branches, picking a random set of sample commits could result in not picking the
master, and therefore having to do very long commit graph traversals to check
ancestors against the other samples.

To prevent this, let's pick the N most recent commits instead of a random
sample. This should generally get the master commit into our sample.

Reviewed By: quark-zju

Differential Revision: D21394302

fbshipit-source-id: f4b8110cd126b90553ec624e48cab0b590e124fb
2020-05-05 09:56:26 -07:00
Durham Goode
6678f088c8 hgweb: disable hgweb
Summary:
Disables 'hg serve' being able to start a web server. This can be
worked around temporarily by setting web.allowhgweb=True, but we should remove
that workaround soon so we can deleted all the code.

Reviewed By: xavierd

Differential Revision: D20951800

fbshipit-source-id: e0d5017647a073b5ede3b0bbc4dd745fabeac816
2020-04-10 10:59:51 -07: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
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
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