Patchwork D3163: discovery: look up bookmarks only among bookmarks

login
register
mail settings
Submitter phabricator
Date April 6, 2018, 11:42 p.m.
Message ID <0e0e8840eb380ad75d1b1f85ce4709b2@localhost.localdomain>
Download mbox | patch
Permalink /patch/30479/
State Not Applicable
Headers show

Comments

phabricator - April 6, 2018, 11:42 p.m.
martinvonz updated this revision to Diff 7819.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3163?vs=7790&id=7819

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

AFFECTED FILES
  mercurial/discovery.py

CHANGE DETAILS




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

Patch

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.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