Mercurial > public > mercurial-scm > hg
diff tests/test-merge-default.t @ 28139:5476a7a039c0
destutil: allow to specify an explicit source for the merge
We can now specify from where the merge is performed. The experimental revset
is updated to take revisions as argument, allowing to test the feature.
This will become very useful for pick the 'rebase' default destination. For this
reason, we also exclude all descendants from the rebased set from the candidate
destinations. This descendants exclusion was not necessary for merge as default
destination would not be picked from anything else than a head.
I'm not super excited with the current error messages, but I would prefer to
delay an overall messages rework once 'hg rebase' is done getting a default
destination aligned with 'hg merge'.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 08 Feb 2016 19:32:29 +0100 |
parents | 7d852bb47b0a |
children | 1b5c61d38a52 |
line wrap: on
line diff
--- a/tests/test-merge-default.t Mon Feb 08 18:12:06 2016 +0100 +++ b/tests/test-merge-default.t Mon Feb 08 19:32:29 2016 +0100 @@ -116,3 +116,36 @@ (run 'hg heads' to see all heads) [255] +(on a branch with a two heads) + + $ hg up 5 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo f >> a + $ hg commit -mf + created new head + $ hg log -r '_destmerge()' + changeset: 6:e88e33f3bf62 + parent: 5:a431fabd6039 + parent: 3:ea9ff125ff88 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: m2 + + +(from the other head) + + $ hg log -r '_destmerge(e88e33f3bf62)' + changeset: 8:b613918999e2 + tag: tip + parent: 5:a431fabd6039 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: f + + +(from unrelated branch) + + $ hg log -r '_destmerge(foobranch)' + abort: branch 'foobranch' has one head - please merge with an explicit rev + (run 'hg heads' to see all heads) + [255]