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

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 3:59 p.m.
Message ID <13429d612651f549d4e6a2474d9d1a1f@localhost.localdomain>
Download mbox | patch
Permalink /patch/43085/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 3:59 p.m.
Closed by commit rHG10f53873d6ac: index: use `index.get_rev` in `unionrepo.unionrevlog` (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7338?vs=17761&id=17902

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

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

AFFECTED FILES
  mercurial/unionrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers, indygreg
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)