discovery: look up bookmarks only among bookmarks
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 06 Apr 2018 10:49:43 -0700
changeset 37451 444ed53f93df
parent 37450 81d35d5d35f9
child 37452 2b38c80557a4
discovery: look up bookmarks only among bookmarks Differential Revision: https://phab.mercurial-scm.org/D3163
mercurial/discovery.py
--- a/mercurial/discovery.py	Fri Apr 06 11:29:30 2018 -0700
+++ b/mercurial/discovery.py	Fri Apr 06 10:49:43 2018 -0700
@@ -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.changectx(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