1 Tests for the --stop flag for `hg evolve` command while resolving phase-divergence |
|
2 ================================================================================== |
|
3 |
|
4 The `--stop` flag stops the interrupted evolution and delete the state file so |
|
5 user can do other things and comeback and do evolution later on |
|
6 |
|
7 This is testing cases when `hg evolve` command is doing phase-divergence resolution. |
|
8 |
|
9 Setup |
|
10 ===== |
|
11 |
|
12 $ cat >> $HGRCPATH <<EOF |
|
13 > [alias] |
|
14 > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" |
|
15 > [extensions] |
|
16 > EOF |
|
17 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
|
18 |
|
19 $ hg init stoprepo |
|
20 $ cd stoprepo |
|
21 $ echo ".*\.orig" > .hgignore |
|
22 $ hg add .hgignore |
|
23 $ hg ci -m "added hgignore" |
|
24 $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done; |
|
25 |
|
26 $ hg glog |
|
27 @ 4:c41c793e0ef1 added d |
|
28 | () draft |
|
29 o 3:ca1b80f7960a added c |
|
30 | () draft |
|
31 o 2:b1661037fa25 added b |
|
32 | () draft |
|
33 o 1:c7586e2a9264 added a |
|
34 | () draft |
|
35 o 0:8fa14d15e168 added hgignore |
|
36 () draft |
|
37 |
|
38 Creating phase divergence, resolution of which will lead to conflicts |
|
39 ---------------------------------------------------------------------- |
|
40 |
|
41 $ hg up .^^^ |
|
42 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
43 $ hg pick -r .~-3 |
|
44 picking 4:c41c793e0ef1 "added d" |
|
45 $ echo foobar > c |
|
46 $ hg add c |
|
47 $ hg amend |
|
48 |
|
49 $ hg glog --hidden |
|
50 @ 6:ddba58020bc0 added d |
|
51 | () draft |
|
52 | x 5:cfe30edc6125 added d |
|
53 |/ () draft |
|
54 | x 4:c41c793e0ef1 added d |
|
55 | | () draft |
|
56 | o 3:ca1b80f7960a added c |
|
57 | | () draft |
|
58 | o 2:b1661037fa25 added b |
|
59 |/ () draft |
|
60 o 1:c7586e2a9264 added a |
|
61 | () draft |
|
62 o 0:8fa14d15e168 added hgignore |
|
63 () draft |
|
64 |
|
65 $ hg phase -r c41c793e0ef1 --public --hidden |
|
66 1 new phase-divergent changesets |
|
67 |
|
68 $ hg glog |
|
69 @ 6:ddba58020bc0 added d |
|
70 | () draft |
|
71 | o 4:c41c793e0ef1 added d |
|
72 | | () public |
|
73 | o 3:ca1b80f7960a added c |
|
74 | | () public |
|
75 | o 2:b1661037fa25 added b |
|
76 |/ () public |
|
77 o 1:c7586e2a9264 added a |
|
78 | () public |
|
79 o 0:8fa14d15e168 added hgignore |
|
80 () public |
|
81 $ hg evolve --phase-divergent |
|
82 recreate:[6] added d |
|
83 atop:[4] added d |
|
84 rebasing to destination parent: ca1b80f7960a |
|
85 merging c |
|
86 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
87 fix conflicts and see `hg help evolve.interrupted` |
|
88 [1] |
|
89 |
|
90 $ hg evolve --stop |
|
91 stopped the interrupted evolve |
|
92 working directory is now at ca1b80f7960a |
|
93 |
|
94 XXX: maybe we should update wdir to where it was |
|
95 $ hg glog |
|
96 * 6:ddba58020bc0 added d |
|
97 | () draft |
|
98 | o 4:c41c793e0ef1 added d |
|
99 | | () public |
|
100 | @ 3:ca1b80f7960a added c |
|
101 | | () public |
|
102 | o 2:b1661037fa25 added b |
|
103 |/ () public |
|
104 o 1:c7586e2a9264 added a |
|
105 | () public |
|
106 o 0:8fa14d15e168 added hgignore |
|
107 () public |
|