Mercurial > hg
changeset 28030:ca2a0a654f54
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 03 Feb 2016 15:12:01 +0000 |
parents | 72072cfc7e91 |
children | 6f248ba85309 |
files | mercurial/commands.py tests/test-largefiles-update.t tests/test-pull-branch.t |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Feb 02 14:49:02 2016 +0000 +++ b/mercurial/commands.py Wed Feb 03 15:12:01 2016 +0000 @@ -5542,13 +5542,17 @@ 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
--- a/tests/test-largefiles-update.t Tue Feb 02 14:49:02 2016 +0000 +++ b/tests/test-largefiles-update.t Wed Feb 03 15:12:01 2016 +0000 @@ -465,6 +465,7 @@ 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 @@ 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
--- a/tests/test-pull-branch.t Tue Feb 02 14:49:02 2016 +0000 +++ b/tests/test-pull-branch.t Wed Feb 03 15:12:01 2016 +0000 @@ -133,6 +133,7 @@ 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