--- a/mercurial/commands.py Thu Aug 01 20:06:00 2013 -0500
+++ b/mercurial/commands.py Thu Aug 01 21:43:14 2013 -0500
@@ -4520,7 +4520,7 @@
if modheads == 0:
return
if optupdate:
- movemarkfrom = repo['.'].node()
+ checkout, movemarkfrom = bookmarks.calculateupdate(ui, repo, checkout)
try:
ret = hg.update(repo, checkout)
except util.Abort, inst:
@@ -5829,14 +5829,7 @@
cmdutil.clearunfinished(repo)
# with no argument, we also move the current bookmark, if any
- movemarkfrom = None
- if rev is None:
- curmark = repo._bookmarkcurrent
- if bookmarks.iscurrent(repo):
- movemarkfrom = repo['.'].node()
- elif curmark:
- ui.status(_("updating to active bookmark %s\n") % curmark)
- rev = curmark
+ rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
# if we defined a bookmark, we have to remember the original bookmark name
brev = rev