comparison tests/test-evolve-phase.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 1e2f683e11e7 98941c28f3e2
comparison
equal deleted inserted replaced
3380:62f742d144da 3418:85cdce113c2c
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 unstable changesets
36 $ hg evolve
37 move:[2] c
38 atop:[4] b
39 working directory is now at 813dde83a7f3
40 $ hg glog
41 @ 5 - 813dde83a7f3 c (secret)
42 |
43 o 4 - 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 unstable changesets
74
75 $ hg glog
76 @ 4 - 87495ea7c9ec b (draft)
77 |
78 | o 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:[4] 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 diff
95 diff -r 87495ea7c9ec a
96 --- a/a Thu Jan 01 00:00:00 1970 +0000
97 +++ b/a Thu Jan 01 00:00:00 1970 +0000
98 @@ -1,1 +1,5 @@
99 +<<<<<<< destination: 87495ea7c9ec - test: b
100 b2
101 +=======
102 +c
103 +>>>>>>> evolving: 13833940840c - test: c
104
105 $ hg glog
106 @ 4 - 87495ea7c9ec b (draft)
107 |
108 | o 2 - 13833940840c c (secret)
109 | |
110 | x 1 - 1e6c11564562 b (draft)
111 |/
112 o 0 - cb9a9f314b8b a (draft)
113
114
115 $ echo c2 > a
116 $ hg resolve -m
117 (no more unresolved files)
118 $ hg evolve -c
119 evolving 2:13833940840c "c"
120
121 $ hg glog
122 @ 5 - 3d2080c198e5 c (secret)
123 |
124 o 4 - 87495ea7c9ec b (draft)
125 |
126 o 0 - cb9a9f314b8b a (draft)
127