[PATCH 2 of 2 V3] update: also use 'destupdate' for pull and unbundle
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Oct 13 13:52:15 CDT 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1444105892 25200
# Mon Oct 05 21:31:32 2015 -0700
# Node ID 600dcd6eaf5368a4cb4fac55dbd0551cde8b8095
# Parent 88139d0257c74a16335585380e0f873efcdffbed
# EXP-Topic defaultdest
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
# hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 600dcd6eaf53
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
@@ -5177,12 +5177,16 @@ def phase(ui, repo, *revs, **opts):
def postincoming(ui, repo, modheads, optupdate, checkout):
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))
if inst.hint:
ui.warn(_("(%s)\n") % inst.hint)
More information about the Mercurial-devel
mailing list