Mercurial > evolve
changeset 4316:e6ee830c4f45 mercurial-4.3
test-compat: merge mercurial-4.4 into mercurial-4.3
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 24 Dec 2018 17:47:40 +0100 |
parents | 55ca0b6276e7 (diff) ef49e48da074 (current diff) |
children | a7998b9cfcaf |
files | tests/test-evolve-issue5966.t tests/test-pullbundle.t tests/test-stabilize-result.t tests/test-topic-flow-publish-flag.t |
diffstat | 4 files changed, 121 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Fri Dec 21 20:14:26 2018 +0100 +++ b/CHANGELOG Mon Dec 24 17:47:40 2018 +0100 @@ -4,6 +4,7 @@ 8.3.3 - in progress ------------------- + * evolve: properly detect unresolved merge conflict (issue-5966) * evolve: fix possible crash when the repo changes during evolve (issue-6028) * test: avoid leaking `hg serve` process * topic: fix error message for the `ngtip` revset
--- a/hgext3rd/evolve/evolvecmd.py Fri Dec 21 20:14:26 2018 +0100 +++ b/hgext3rd/evolve/evolvecmd.py Mon Dec 24 17:47:40 2018 +0100 @@ -21,6 +21,7 @@ hg, lock as lockmod, merge, + mergeutil, node as nodemod, obsolete, obsutil, @@ -1729,6 +1730,8 @@ """logic for handling of `hg evolve --continue`""" with repo.wlock(), repo.lock(): + ms = merge.mergestate.read(repo) + mergeutil.checkunresolved(ms) if (evolvestate['command'] == 'next' or evolvestate['category'] == 'orphan'): _completeorphan(ui, repo, evolvestate)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-issue5966.t Mon Dec 24 17:47:40 2018 +0100 @@ -0,0 +1,117 @@ +Testing evolve --continue with unresolved conflicts (issue5966) +https://bz.mercurial-scm.org/show_bug.cgi?id=5966 + + $ . $TESTDIR/testlib/common.sh + + $ hg init issue5966 + $ cd issue5966 + $ cat > .hg/hgrc << EOF + > [phases] + > publish = false + > [alias] + > glog = log -GT "{rev}: {desc}" + > [extensions] + > evolve= + > EOF + + $ touch a + $ hg ci -Aqm 'empty' + + $ echo apple > a + $ hg ci -m 'apple' + $ echo banana > a + $ hg ci -m 'banana' + $ echo coconut > a + $ hg ci -m 'coconut' + + $ hg glog + @ 3: coconut + | + o 2: banana + | + o 1: apple + | + o 0: empty + + + $ hg up -q 1 + +Amending revision 1 in a way that causes conflicts + + $ echo apricot > a + $ hg amend -m 'apricot' + 2 new unstable changesets + + $ hg glog --hidden + @ 5: apricot + | + | x 4: temporary amend commit for 7f59f18ca4a9 + | | + | | o 3: coconut + | | | + | | o 2: banana + | |/ + | x 1: apple + |/ + o 0: empty + + + $ hg evolve -t :fail + move:[2] banana + atop:[5] apricot + fix conflicts and see `hg help evolve.interrupted` + [1] + $ hg evolve --list + 34a690fcf6ab: banana + unstable: 7f59f18ca4a9 (obsolete parent) + + feb8c0bffa1f: coconut + unstable: 34a690fcf6ab (unstable parent) + +Evolve should detect unresolved conflict. + + $ hg resolve --list + U a + $ hg evolve --continue + abort: unresolved merge conflicts (see 'hg help resolve') + [255] + +(even when ran twice) + + $ hg evolve --continue + abort: unresolved merge conflicts (see 'hg help resolve') + [255] + + $ cat a + apricot + $ hg resolve --list + U a + $ hg resolve a -t :other + (no more unresolved files) + continue: hg evolve --continue + $ hg resolve --list + R a + $ hg evolve --continue + evolving 2:34a690fcf6ab "banana" + working directory is now at e4207a610ed0 + $ hg resolve --list + +evolve the rest of the stack + + $ hg evolve + move:[3] coconut + atop:[6] banana + merging a + working directory is now at d77b4639fe26 + +All commit evolved + + $ hg glog + @ 7: coconut + | + o 6: banana + | + o 5: apricot + | + o 0: empty +
--- a/tests/test-stabilize-result.t Fri Dec 21 20:14:26 2018 +0100 +++ b/tests/test-stabilize-result.t Mon Dec 24 17:47:40 2018 +0100 @@ -96,7 +96,6 @@ +a +newer a $ hg evolve --continue - evolving 5:3655f0f50885 "newer a" abort: unresolved merge conflicts (see 'hg help resolve') [255] $ hg resolve -m a