# HG changeset patch # User Pierre-Yves David # Date 2015-10-06 04:31:32 # Node ID 70ac5f724fbdc3b86de8e7d3e854e1045c672f60 # Parent 5c57d01fe64e32fb3b3e70943abdc40960851690 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. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5185,8 +5185,12 @@ def postincoming(ui, repo, modheads, opt 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))