D3163: discovery: look up bookmarks only among bookmarks

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Apr 6 17:59:27 UTC 2018


martinvonz 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/D3163

AFFECTED FILES
  mercurial/discovery.py

CHANGE DETAILS

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -297,12 +297,12 @@
     for bm in localbookmarks:
         rnode = remotebookmarks.get(bm)
         if rnode and rnode in repo:
-            lctx, rctx = repo[bm], repo[rnode]
+            lctx, rctx = localbookmarks.ctx(bm), repo[rnode]
             if bookmarks.validdest(repo, rctx, lctx):
                 bookmarkedheads.add(lctx.node())
         else:
             if bm in newbookmarks and bm not in remotebookmarks:
-                bookmarkedheads.add(repo[bm].node())
+                bookmarkedheads.add(localbookmarks[bm])
 
     return bookmarkedheads
 



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


More information about the Mercurial-devel mailing list