Patchwork D7098: widening: trust user to give full "known" set

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2019, 2:22 p.m.
Message ID <45eec3523eba4ff76c834ce93e87718a@localhost.localdomain>
Download mbox | patch
Permalink /patch/42398/
State Not Applicable
Headers show

Comments

phabricator - Oct. 16, 2019, 2:22 p.m.
Closed by commit rHGd0cd26a7c7a7: widening: trust user to give full &quot;known&quot; set (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7098?vs=17152&id=17216

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7098/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7098

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS




To: martinvonz, durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -143,14 +143,12 @@ 
     # c) goto a
     #
     # until they've built up the full new state.
-    # Convert to revnums and intersect with "common". The client should
-    # have made it a subset of "common" already, but let's be safe.
-    known = set(repo.revs(b"%ln & ::%ln", known, common))
+    knownrevs = {repo.changelog.rev(n) for n in known}
     # TODO: we could send only roots() of this set, and the
     # list of nodes in common, and the client could work out
     # what to strip, instead of us explicitly sending every
     # single node.
-    deadrevs = known
+    deadrevs = knownrevs
 
     def genkills():
         for r in deadrevs:
@@ -160,7 +158,7 @@ 
 
     bundler.newpart(_CHANGESPECPART, data=genkills())
     newvisit, newfull, newellipsis = exchange._computeellipsis(
-        repo, set(), common, known, newmatch
+        repo, set(), common, knownrevs, newmatch
     )
     if newvisit:
         packer = changegroup.getbundler(