discovery: look up bookmarks only among bookmarks
Differential Revision: https://phab.mercurial-scm.org/D3163
--- 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