Closed by commit rHGa35bbeef9d88: index: use `index.has_node` in 
`bookmarks.bmstore` (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/D7344?vs=17767&id=17875

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

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

AFFECTED FILES
  mercurial/bookmarks.py

CHANGE DETAILS

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -78,7 +78,7 @@
         self._nodemap = nodemap = {}  # node: sorted([refspec, ...])
         self._clean = True
         self._aclean = True
-        nm = repo.changelog.nodemap
+        has_node = repo.changelog.index.has_node
         tonode = bin  # force local lookup
         try:
             with _getbkfile(repo) as bkfile:
@@ -89,7 +89,7 @@
                     try:
                         sha, refspec = line.split(b' ', 1)
                         node = tonode(sha)
-                        if node in nm:
+                        if has_node(node):
                             refspec = encoding.tolocal(refspec)
                             refmap[refspec] = node
                             nrefs = nodemap.get(node)



To: marmoute, #hg-reviewers, indygreg
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to