Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 26641:5c57d01fe64e
destupdate: also include bookmark related logic
For the same reason, we move the bookmark related update logic into the
'destupdate' function. This requires to extend the returns of the function to
include the bookmark that needs to move (more or less) and the bookmark to
activate at the end of the function. See function documentation for details on
this returns.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 29 Sep 2015 01:03:26 -0700 |
parents | b13fdcc4e700 |
children | 70ac5f724fbd |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Oct 13 10:57:54 2015 -0700 +++ b/mercurial/commands.py Tue Sep 29 01:03:26 2015 -0700 @@ -6573,6 +6573,7 @@ Returns 0 on success, 1 if there are unresolved files. """ + movemarkfrom = None if rev and node: raise error.Abort(_("please specify just one revision")) @@ -6588,9 +6589,6 @@ raise error.Abort(_("you can't specify a revision and a date")) rev = cmdutil.finddate(ui, repo, date) - # with no argument, we also move the active bookmark, if any - rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev) - # if we defined a bookmark, we have to remember the original name brev = rev rev = scmutil.revsingle(repo, rev, rev).rev() @@ -6602,7 +6600,8 @@ if check: cmdutil.bailifchanged(repo, merge=False) if rev is None: - rev = destutil.destupdate(repo, clean=clean, check=check) + updata = destutil.destupdate(repo, clean=clean, check=check) + rev, movemarkfrom, brev = updata repo.ui.setconfig('ui', 'forcemerge', tool, 'update')