Patchwork D7323: index: use `index.has_node` in `revlog.addrevision`

login
register
mail settings
Submitter phabricator
Date Nov. 9, 2019, 8:39 a.m.
Message ID <c647de43be57bb875ac852db443261f5@localhost.localdomain>
Download mbox | patch
Permalink /patch/43050/
State Not Applicable
Headers show

Comments

phabricator - Nov. 9, 2019, 8:39 a.m.
Closed by commit rHGf947de6caed3: index: use `index.has_node` in `revlog.addrevision` (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/D7323?vs=17836&id=17866

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

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1995,7 +1995,7 @@ 
             )
 
         node = node or self.hash(rawtext, p1, p2)
-        if node in self.nodemap:
+        if self.index.has_node(node):
             return node
 
         if validatehash: