Patchwork D7338: index: use `index.get_rev` in `unionrepo.unionrevlog`

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:25 p.m.
Message ID <differential-rev-PHID-DREV-jxcn47cbyncqafu5iz4k-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42943/
State Superseded
Headers show

Comments

phabricator - Nov. 8, 2019, 4:25 p.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/unionrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -62,9 +62,10 @@ 
             if linkmapper is not None:  # link is to same revlog
                 base = linkmapper(base)
 
-            if node in self.nodemap:
+            this_rev = self.index.get_rev(node)
+            if this_rev is not None:
                 # this happens for the common revlog revisions
-                self.bundlerevs.add(self.nodemap[node])
+                self.bundlerevs.add(this_rev)
                 continue
 
             p1node = self.revlog2.node(p1rev)