Skip to content
Snippets Groups Projects
Commit 75f6491b authored by Manuel Jacob's avatar Manuel Jacob
Browse files

discovery: weaken claim about returned common heads if ancestorsof are given

As the test case shows, the claim is not true in general.
parent 9719e118
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,8 @@
any longer.
"heads" is either the supplied heads, or else the remote's heads.
"ancestorsof" if not None, restrict the discovery to a subset defined by
these nodes. Changeset outside of this set won't be considered (and
won't appears in "common")
these nodes. Changeset outside of this set won't be considered (but may
still appear in "common").
If you pass heads and they are all known locally, the response lists just
these heads in "common" and in "heads".
......
......@@ -1112,3 +1112,40 @@
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob)
* @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
$ cd ..
Even if the set of revs to discover is restricted, unrelated revs may be
returned as common heads.
$ mkdir ancestorsof
$ cd ancestorsof
$ hg init a
$ hg clone a b -q
$ cd b
$ hg debugbuilddag '.:root *root *root'
$ hg log -G -T '{node|short}'
o fa942426a6fd
|
| o 66f7d451a68b
|/
o 1ea73414a91b
$ hg push -r 66f7d451a68b -q
$ hg debugdiscovery --verbose --rev fa942426a6fd
comparing with $TESTTMP/ancestorsof/a
searching for changes
elapsed time: * seconds (glob)
heads summary:
total common heads: 1
also local heads: 1
also remote heads: 1
both: 1
local heads: 2
common: 1
missing: 1
remote heads: 1
common: 1
unknown: 0
local changesets: 3
common: 2
missing: 1
common heads: 66f7d451a68b
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment