Mercurial > hg-stable
changeset 22179:46308fadaa15 stable
merge: show the scary multiple ancestor hint for merges only, not for updates
Updates with uncommited changes will always only have one ancestor - the parent
revision. Updates between existing revision should (and will) always give the
same result no matter which ancestor is used. The warning is thus only relevant
when doing a "real" merge.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 15 Aug 2014 02:39:01 +0200 |
parents | 70383c6961b4 |
children | 17011b36aac7 |
files | mercurial/merge.py tests/test-merge-criss-cross.t |
diffstat | 2 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Aug 14 16:26:41 2014 -0700 +++ b/mercurial/merge.py Fri Aug 15 02:39:01 2014 +0200 @@ -1052,7 +1052,7 @@ cahs = repo.changelog.commonancestorsheads(p1.node(), p2.node()) pas = [repo[anc] for anc in (sorted(cahs) or [nullid])] else: - pas = [p1.ancestor(p2, warn=True)] + pas = [p1.ancestor(p2, warn=branchmerge)] fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2)
--- a/tests/test-merge-criss-cross.t Thu Aug 14 16:26:41 2014 -0700 +++ b/tests/test-merge-criss-cross.t Fri Aug 15 02:39:01 2014 +0200 @@ -24,8 +24,6 @@ $ hg ci -m '5 second change f1' $ hg up -r3 - note: using 0f6b37dbe527 as ancestor of adfe50279922 and cf89f02107e5 - alternatively, use --config merge.preferancestor=40663881a6dd 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo '6 second change' > f2 $ hg ci -m '6 second change f2' @@ -169,8 +167,6 @@ The other way around: $ hg up -C -r5 - note: using 0f6b37dbe527 as ancestor of 3b08d01b0ab5 and adfe50279922 - alternatively, use --config merge.preferancestor=40663881a6dd 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge -v --debug --config merge.preferancestor="*" note: merging adfe50279922+ and 3b08d01b0ab5 using bids from ancestors 0f6b37dbe527 and 40663881a6dd