changeset 37451:444ed53f93df

discovery: look up bookmarks only among bookmarks Differential Revision: https://phab.mercurial-scm.org/D3163
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Apr 2018 10:49:43 -0700
parents 81d35d5d35f9
children 2b38c80557a4
files mercurial/discovery.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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