Mercurial > hg
changeset 26642:70ac5f724fbd
update: also use 'destupdate' for pull and unbundle
Update can also be performed by 'hg pull --update' and 'hg unbundle'. We use the
destupdate function in these case too.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 05 Oct 2015 21:31:32 -0700 |
parents | 5c57d01fe64e |
children | d2e16419d3f4 |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Sep 29 01:03:26 2015 -0700 +++ b/mercurial/commands.py Mon Oct 05 21:31:32 2015 -0700 @@ -5185,8 +5185,12 @@ if modheads == 0: return if optupdate: - checkout, movemarkfrom = bookmarks.calculateupdate(ui, repo, checkout) try: + brev = checkout + movemarkfrom = None + if not checkout: + updata = destutil.destupdate(repo) + checkout, movemarkfrom, brev = updata ret = hg.update(repo, checkout) except error.Abort as inst: ui.warn(_("not updating: %s\n") % str(inst))