Mercurial > evolve
comparison tests/test-issue-5720.t @ 3418:85cdce113c2c mercurial-4.3
test-compat: merge stable into mercurial-4.3
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 16 Jan 2018 04:35:34 +0100 |
parents | e1f3e43a50a4 |
children | 98941c28f3e2 |
comparison
equal
deleted
inserted
replaced
3380:62f742d144da | 3418:85cdce113c2c |
---|---|
1 This test file test the #5720 issue | |
2 | |
3 Check that `hg evolve --continue` doesn't change changeset phase from secret | |
4 to draft after a merge conflict. | |
5 | |
6 https://bz.mercurial-scm.org/show_bug.cgi?id=5720 | |
7 | |
8 Global setup | |
9 ============ | |
10 | |
11 $ . $TESTDIR/testlib/common.sh | |
12 $ cat >> $HGRCPATH <<EOF | |
13 > [ui] | |
14 > interactive = true | |
15 > [phases] | |
16 > publish=False | |
17 > [extensions] | |
18 > evolve = | |
19 > EOF | |
20 | |
21 Test | |
22 ==== | |
23 | |
24 $ hg init $TESTTMP/issue-5720 | |
25 $ cd $TESTTMP/issue-5720 | |
26 | |
27 Create two drafts commits and one secret | |
28 $ echo a > a | |
29 $ hg commit -Am a | |
30 adding a | |
31 $ echo b > a | |
32 $ hg commit -m b | |
33 $ echo c > a | |
34 $ hg commit --secret -m c | |
35 $ hg log -G -T "{rev}: {phase}" | |
36 @ 2: secret | |
37 | | |
38 o 1: draft | |
39 | | |
40 o 0: draft | |
41 | |
42 Amend the second draft with new content | |
43 $ hg prev | |
44 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
45 [1] b | |
46 $ echo b2 > a | |
47 $ hg amend | |
48 1 new unstable changesets | |
49 $ hg log -G -T "{rev}: {phase}" | |
50 @ 4: draft | |
51 | | |
52 | o 2: secret | |
53 | | | |
54 | x 1: draft | |
55 |/ | |
56 o 0: draft | |
57 | |
58 Evolve which triggers a conflict | |
59 $ hg evolve | |
60 move:[2] c | |
61 atop:[4] b | |
62 merging a | |
63 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
64 evolve failed! | |
65 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort | |
66 abort: unresolved merge conflicts (see hg help resolve) | |
67 [255] | |
68 | |
69 Fix the conflict | |
70 $ echo c2 > a | |
71 $ hg resolve -m | |
72 (no more unresolved files) | |
73 | |
74 Continue the evolution | |
75 $ hg evolve --continue | |
76 evolving 2:13833940840c "c" | |
77 | |
78 Tip should stay in secret phase | |
79 $ hg log -G -T "{rev}: {phase}" | |
80 @ 5: secret | |
81 | | |
82 o 4: draft | |
83 | | |
84 o 0: draft | |
85 | |
86 $ hg log -r . -T '{phase}\n' | |
87 secret |