D7328: index: use `index.has_node` in `revlog.addgroup`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Nov 9 03:40:01 EST 2019


Closed by commit rHG729840ecbae5: index: use `index.has_node` in `revlog.addgroup` (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/D7328?vs=17841&id=17867

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

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -2306,18 +2306,18 @@
 
                 nodes.append(node)
 
-                if node in self.nodemap:
+                if self.index.has_node(node):
                     self._nodeduplicatecallback(transaction, node)
                     # this can happen if two branches make the same change
                     continue
 
                 for p in (p1, p2):
-                    if p not in self.nodemap:
+                    if not self.index.has_node(p):
                         raise error.LookupError(
                             p, self.indexfile, _(b'unknown parent')
                         )
 
-                if deltabase not in self.nodemap:
+                if not self.index.has_node(deltabase):
                     raise error.LookupError(
                         deltabase, self.indexfile, _(b'unknown delta base')
                     )



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


More information about the Mercurial-devel mailing list