Mercurial > evolve
comparison tests/test-evolve-stop-phasediv.t @ 3732:422294cd682f stable
tests: add test showing `hg evolve --stop` works fine with phase-divergence
This patch adds a new test file which contains test demonstrating that `--stop`
flag works well while resolving phase-divergence using `hg evolve`.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 28 Apr 2018 18:44:07 +0530 |
parents | |
children | f0096db2a7b1 |
comparison
equal
deleted
inserted
replaced
3731:83dc216b9e9a | 3732:422294cd682f |
---|---|
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 grab -r .~-3 | |
44 grabbing 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 evolution failed! | |
88 fix conflict then run 'hg evolve --continue' or use `hg evolve --abort` | |
89 abort: unresolved merge conflicts (see hg help resolve) | |
90 [255] | |
91 | |
92 $ hg evolve --stop | |
93 stopped the interrupted evolve | |
94 working directory is now at ca1b80f7960a | |
95 | |
96 XXX: maybe we should update wdir to where it was | |
97 $ hg glog | |
98 * 6:ddba58020bc0 added d | |
99 | () draft | |
100 | o 4:c41c793e0ef1 added d | |
101 | | () public | |
102 | @ 3:ca1b80f7960a added c | |
103 | | () public | |
104 | o 2:b1661037fa25 added b | |
105 |/ () public | |
106 o 1:c7586e2a9264 added a | |
107 | () public | |
108 o 0:8fa14d15e168 added hgignore | |
109 () public |