Mercurial > evolve
comparison tests/test-evolve-phase.t @ 3387:b3be4797d3c6
tests: add a test demonstarting lose of phase in `hg evolve`
This patch adds a new test file which demonstrates the lose of phase information
when hg evolve command runs into conflict. This is algo bug5720. The upcoming
patch will fix it.
A new test file is added as existing test files serve their own purpose and are
already cluttered.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 09 Jan 2018 15:33:57 +0530 |
parents | |
children | be41e4740a25 |
comparison
equal
deleted
inserted
replaced
3386:2a51107e60cf | 3387:b3be4797d3c6 |
---|---|
1 Testing the handling of phases for `hg evolve` command | |
2 | |
3 $ cat >> $HGRCPATH <<EOF | |
4 > [phases] | |
5 > publish = False | |
6 > [alias] | |
7 > glog = log -G --template='{rev} - {node|short} {desc} ({phase})\n' | |
8 > [extensions] | |
9 > EOF | |
10 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH | |
11 | |
12 Testing when there are no conflicts during evolve | |
13 | |
14 $ hg init noconflict | |
15 $ cd noconflict | |
16 $ echo a>a | |
17 $ hg ci -Aqm a | |
18 $ echo b>b | |
19 $ hg ci -Aqm b | |
20 $ echo c>c | |
21 $ hg ci -Aqsm c | |
22 $ hg glog | |
23 @ 2 - 177f92b77385 c (secret) | |
24 | | |
25 o 1 - d2ae7f538514 b (draft) | |
26 | | |
27 o 0 - cb9a9f314b8b a (draft) | |
28 | |
29 | |
30 $ hg prev | |
31 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
32 [1] b | |
33 $ echo b2>b | |
34 $ hg amend | |
35 1 new orphan changesets | |
36 $ hg evolve | |
37 move:[2] c | |
38 atop:[3] b | |
39 working directory is now at 813dde83a7f3 | |
40 $ hg glog | |
41 @ 4 - 813dde83a7f3 c (secret) | |
42 | | |
43 o 3 - fd89d0f19529 b (draft) | |
44 | | |
45 o 0 - cb9a9f314b8b a (draft) | |
46 | |
47 $ cd .. | |
48 | |
49 Testing case when there are conflicts (bug 5720) | |
50 | |
51 $ hg init conflicts | |
52 $ cd conflicts | |
53 $ echo a > a | |
54 $ hg ci -Am a | |
55 adding a | |
56 $ echo b > a | |
57 $ hg ci -m b | |
58 $ echo c > a | |
59 $ hg ci -sm c | |
60 $ hg glog | |
61 @ 2 - 13833940840c c (secret) | |
62 | | |
63 o 1 - 1e6c11564562 b (draft) | |
64 | | |
65 o 0 - cb9a9f314b8b a (draft) | |
66 | |
67 | |
68 $ hg prev | |
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 [1] b | |
71 $ echo b2 > a | |
72 $ hg amend | |
73 1 new orphan changesets | |
74 | |
75 $ hg glog | |
76 @ 3 - 87495ea7c9ec b (draft) | |
77 | | |
78 | * 2 - 13833940840c c (secret) | |
79 | | | |
80 | x 1 - 1e6c11564562 b (draft) | |
81 |/ | |
82 o 0 - cb9a9f314b8b a (draft) | |
83 | |
84 $ hg evolve | |
85 move:[2] c | |
86 atop:[3] b | |
87 merging a | |
88 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
89 evolve failed! | |
90 fix conflict and run 'hg evolve --continue' or use 'hg update -C .' to abort | |
91 abort: unresolved merge conflicts (see hg help resolve) | |
92 [255] | |
93 | |
94 $ hg glog | |
95 @ 3 - 87495ea7c9ec b (draft) | |
96 | | |
97 | * 2 - 13833940840c c (secret) | |
98 | | | |
99 | x 1 - 1e6c11564562 b (draft) | |
100 |/ | |
101 o 0 - cb9a9f314b8b a (draft) | |
102 | |
103 | |
104 $ echo c2 > a | |
105 $ hg resolve -m | |
106 (no more unresolved files) | |
107 $ hg evolve -c | |
108 evolving 2:13833940840c "c" | |
109 | |
110 XXX: Here 4 should be having secret phase just as same as 2 | |
111 $ hg glog | |
112 @ 4 - 3d2080c198e5 c (draft) | |
113 | | |
114 o 3 - 87495ea7c9ec b (draft) | |
115 | | |
116 o 0 - cb9a9f314b8b a (draft) | |
117 |