diff mercurial/destutil.py @ 37359:e27298bf11dd

bookmarks: calculateupdate() returns a bookmark, not a rev This changes the inaccurate/unclear documentation and also changes the code so "node" now contains a binary nodeid. Differential Revision: https://phab.mercurial-scm.org/D3087
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 04 Apr 2018 15:13:32 -0700
parents 68fcc5503ec5
children a973bb92ab71
line wrap: on
line diff
--- a/mercurial/destutil.py	Wed Apr 04 10:13:08 2018 -0700
+++ b/mercurial/destutil.py	Wed Apr 04 15:13:32 2018 -0700
@@ -55,10 +55,10 @@
 def _destupdatebook(repo, clean):
     """decide on an update destination from active bookmark"""
     # we also move the active bookmark, if any
-    activemark = None
-    node, movemark = bookmarks.calculateupdate(repo.ui, repo, None)
-    if node is not None:
-        activemark = node
+    node = None
+    activemark, movemark = bookmarks.calculateupdate(repo.ui, repo, None)
+    if activemark is not None:
+        node = repo.lookup(activemark)
     return node, movemark, activemark
 
 def _destupdatebranch(repo, clean):