# HG changeset patch # User Pierre-Yves David # Date 2016-02-03 15:12:01 # Node ID ca2a0a654f54c3f790582c1a9eac60e0fc03382b # Parent 72072cfc7e9166c765c39f13bdda7cd58fad6a43 update: warn about other topological head in pull and unbundle Other commands have a '--update' triggering a bare update. We now issue the message introduced into the previous changeset for these too. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5542,13 +5542,17 @@ def postincoming(ui, repo, modheads, opt if modheads == 0: return if optupdate: + warndest = False try: brev = checkout movemarkfrom = None if not checkout: + warndest = True updata = destutil.destupdate(repo) checkout, movemarkfrom, brev = updata ret = hg.update(repo, checkout) + if warndest: + destutil.statusotherdests(ui, repo) except error.UpdateAbort as inst: msg = _("not updating: %s") % str(inst) hint = inst.hint diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t --- a/tests/test-largefiles-update.t +++ b/tests/test-largefiles-update.t @@ -465,6 +465,7 @@ Test that the internal linear merging wo keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l 2 files updated, 1 files merged, 0 files removed, 0 files unresolved + 1 other heads for branch "default" $ hg status -A large1 M large1 @@ -498,6 +499,7 @@ Test that the internal linear merging wo keep (l)ocal ba94c2efe5b7c5e0af8d189295ce00553b0612b7 or take (o)ther e5bb990443d6a92aaf7223813720f7566c9dd05b? l 2 files updated, 1 files merged, 0 files removed, 0 files unresolved + 1 other heads for branch "default" $ hg status -A large1 M large1 diff --git a/tests/test-pull-branch.t b/tests/test-pull-branch.t --- a/tests/test-pull-branch.t +++ b/tests/test-pull-branch.t @@ -133,6 +133,7 @@ Should succeed because there is only one adding file changes added 4 changesets with 4 changes to 1 files (+1 heads) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 1 other heads for branch "branchA" Make changes on new branch on tt