obsdiscovery: avoid considering locally hidden changeset
This looks like a dubious optimisation
--- a/hgext3rd/evolve/obsdiscovery.py Wed Mar 11 18:29:46 2020 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py Fri Mar 06 02:41:53 2020 +0100
@@ -844,7 +844,12 @@
repo = pullop.repo
remote = pullop.remote
unfi = repo.unfiltered()
- revs = unfi.revs(b'::(%ln - null)', pullop.common)
+ # Also exclude filtered revisions. Working on unfiltered repository can
+ # give a bit more precise view of the repository. However it makes the
+ # overall operation more complicated.
+ filteredrevs = repo.changelog.filteredrevs
+ # XXX probably not very efficient
+ revs = unfi.revs(b'::(%ln - null) - %ld', pullop.common, filteredrevs)
boundaries = {b'heads': pullop.pulledsubset}
if not revs: # nothing common
boundaries[b'common'] = [node.nullid]
@@ -859,8 +864,8 @@
if bundle2 and _canobshashrange(repo, remote):
obsexcmsg(repo.ui, b"looking for common markers in %i nodes\n"
% len(revs))
- boundaries[b'missing'] = findmissingrange(repo.ui, unfi, pullop.remote,
- revs)
+ missing = findmissingrange(repo.ui, repo, pullop.remote, revs)
+ boundaries[b'missing'] = missing
else:
boundaries[b'common'] = [node.nullid]
return boundaries
--- a/tests/test-discovery-hidden-common.t Wed Mar 11 18:29:46 2020 +0100
+++ b/tests/test-discovery-hidden-common.t Fri Mar 06 02:41:53 2020 +0100
@@ -87,7 +87,7 @@
$ hg -R ../client pull
pulling from ssh://user@dummy/server
searching for changes
- OBSEXC: looking for common markers in 2 nodes
+ OBSEXC: looking for common markers in 1 nodes
adding changesets
adding manifests
adding file changes