[PATCH] update: preserve possible bookmark name to set current bookmark correctly
David Soria Parra
dsp at php.net
Tue Feb 15 18:29:10 CST 2011
# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1297816122 -3600
# Node ID a2df3d9adf1cf2c453f0997eb936636ed0bba8c3
# Parent a184dbd9b2c52c2414ea247d6d5a9dacdc1dcd2d
update: preserve possible bookmark name to set current bookmark correctly
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4026,6 +4026,8 @@
if not rev:
rev = node
+ # if we defined a bookmark, we have to remember the original bookmark name
+ brev = rev
rev = cmdutil.revsingle(repo, rev, rev).rev()
if check and clean:
@@ -4048,7 +4050,7 @@
ret = hg.update(repo, rev)
if repo.ui.configbool('bookmarks', 'track.current'):
- bookmarks.setcurrent(repo, rev)
+ bookmarks.setcurrent(repo, brev)
return ret
More information about the Mercurial-devel
mailing list