|
1 $ cat >> $HGRCPATH <<EOF |
|
2 > [defaults] |
|
3 > amend=-d "0 0" |
|
4 > fold=-d "0 0" |
|
5 > [web] |
|
6 > push_ssl = false |
|
7 > allow_push = * |
|
8 > [phases] |
|
9 > publish = False |
|
10 > [diff] |
|
11 > git = 1 |
|
12 > unified = 0 |
|
13 > [ui] |
|
14 > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n |
|
15 > [extensions] |
|
16 > hgext.graphlog= |
|
17 > EOF |
|
18 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH |
|
19 $ mkcommit() { |
|
20 > echo "$1" > "$1" |
|
21 > hg add "$1" |
|
22 > hg ci -m "add $1" |
|
23 > } |
|
24 |
|
25 $ mkstack() { |
|
26 > # Creates a stack of commit based on $1 with messages from $2, $3 .. |
|
27 > hg update "$1" -C |
|
28 > shift |
|
29 > mkcommits $* |
|
30 > } |
|
31 |
|
32 $ mkcommits() { |
|
33 > for i in $@; do mkcommit $i ; done |
|
34 > } |
|
35 |
|
36 ============================================================================== |
|
37 Test instability resolution for a changeset unstable because its parent |
|
38 is obsolete with one successor |
|
39 ============================================================================== |
|
40 $ hg init test1 |
|
41 $ cd test1 |
|
42 $ mkcommits _a _b _c |
|
43 $ hg up "desc(_b)" |
|
44 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
45 $ hg amend -m "bprime" |
|
46 1 new unstable changesets |
|
47 $ hg log -G |
|
48 @ 3:36050226a9b9@default(draft) bprime |
|
49 | |
|
50 | o 2:102002290587@default(draft) add _c |
|
51 | | |
|
52 | x 1:37445b16603b@default(draft) add _b |
|
53 |/ |
|
54 o 0:135f39f4bd78@default(draft) add _a |
|
55 |
|
56 |
|
57 $ hg evo --all --any --unstable |
|
58 move:[2] add _c |
|
59 atop:[3] bprime |
|
60 working directory is now at fdcf3523a74d |
|
61 $ hg log -G |
|
62 @ 4:fdcf3523a74d@default(draft) add _c |
|
63 | |
|
64 o 3:36050226a9b9@default(draft) bprime |
|
65 | |
|
66 o 0:135f39f4bd78@default(draft) add _a |
|
67 |
|
68 |
|
69 $ cd .. |
|
70 |
|
71 =============================================================================== |
|
72 Test instability resolution for a merge changeset unstable because one |
|
73 of its parent is obsolete |
|
74 Not supported yet |
|
75 ============================================================================== |
|
76 |
|
77 $ hg init test2 |
|
78 $ cd test2 |
|
79 $ mkcommit base |
|
80 $ mkcommits _a |
|
81 $ hg up "desc(base)" |
|
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
83 $ mkcommit _c |
|
84 created new head |
|
85 $ hg merge "desc(_a)" >/dev/null |
|
86 $ hg commit -m "merge" |
|
87 $ hg up "desc(_a)" |
|
88 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
89 $ hg amend -m "aprime" |
|
90 1 new unstable changesets |
|
91 $ hg log -G |
|
92 @ 4:47127ea62e5f@default(draft) aprime |
|
93 | |
|
94 | o 3:6b4280e33286@default(draft) merge |
|
95 | |\ |
|
96 +---o 2:474da87dd33b@default(draft) add _c |
|
97 | | |
|
98 | x 1:b3264cec9506@default(draft) add _a |
|
99 |/ |
|
100 o 0:b4952fcf48cf@default(draft) add base |
|
101 |
|
102 |
|
103 $ hg evo --all --any --unstable |
|
104 move:[3] merge |
|
105 atop:[4] aprime |
|
106 abort: no support for evolving merge changesets yet |
|
107 (Redo the merge and use `hg prune <old> --succ <new>` to obsolete the old one) |
|
108 [255] |
|
109 $ hg log -G |
|
110 @ 4:47127ea62e5f@default(draft) aprime |
|
111 | |
|
112 | o 3:6b4280e33286@default(draft) merge |
|
113 | |\ |
|
114 +---o 2:474da87dd33b@default(draft) add _c |
|
115 | | |
|
116 | x 1:b3264cec9506@default(draft) add _a |
|
117 |/ |
|
118 o 0:b4952fcf48cf@default(draft) add base |
|
119 |
|
120 |
|
121 $ cd .. |
|
122 |
|
123 =============================================================================== |
|
124 Test instability resolution for a merge changeset unstable because both |
|
125 of its parent are obsolete |
|
126 Not supported yet |
|
127 ============================================================================== |
|
128 |
|
129 $ hg init test3 |
|
130 $ cd test3 |
|
131 $ mkcommit base |
|
132 $ mkcommits _a |
|
133 $ hg up "desc(base)" |
|
134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
135 $ mkcommit _c |
|
136 created new head |
|
137 $ hg merge "desc(_a)" >/dev/null |
|
138 $ hg commit -m "merge" |
|
139 $ hg up "desc(_a)" |
|
140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
141 $ hg amend -m "aprime" |
|
142 1 new unstable changesets |
|
143 $ hg up "desc(_c)" |
|
144 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
145 $ hg amend -m "cprime" |
|
146 $ hg log -G |
|
147 @ 5:2db39fda7e2f@default(draft) cprime |
|
148 | |
|
149 | o 4:47127ea62e5f@default(draft) aprime |
|
150 |/ |
|
151 | o 3:6b4280e33286@default(draft) merge |
|
152 | |\ |
|
153 +---x 2:474da87dd33b@default(draft) add _c |
|
154 | | |
|
155 | x 1:b3264cec9506@default(draft) add _a |
|
156 |/ |
|
157 o 0:b4952fcf48cf@default(draft) add base |
|
158 |
|
159 |
|
160 $ hg evo --all --any --unstable |
|
161 move:[3] merge |
|
162 atop:[5] cprime |
|
163 abort: no support for evolving merge changesets yet |
|
164 (Redo the merge and use `hg prune <old> --succ <new>` to obsolete the old one) |
|
165 [255] |
|
166 $ hg log -G |
|
167 @ 5:2db39fda7e2f@default(draft) cprime |
|
168 | |
|
169 | o 4:47127ea62e5f@default(draft) aprime |
|
170 |/ |
|
171 | o 3:6b4280e33286@default(draft) merge |
|
172 | |\ |
|
173 +---x 2:474da87dd33b@default(draft) add _c |
|
174 | | |
|
175 | x 1:b3264cec9506@default(draft) add _a |
|
176 |/ |
|
177 o 0:b4952fcf48cf@default(draft) add base |
|
178 |
|
179 |
|
180 $ cd .. |
|
181 |
|
182 =============================================================================== |
|
183 Test instability resolution for a changeset unstable because its parent |
|
184 is obsolete with multiple successors all in one chain (simple split) |
|
185 Not supported yet |
|
186 ============================================================================== |
|
187 |
|
188 $ hg init test4 |
|
189 $ cd test4 |
|
190 $ mkcommits _a _b _c |
|
191 $ hg up "desc(_a)" |
|
192 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
193 $ mkcommits bprimesplit1 bprimesplit2 |
|
194 created new head |
|
195 $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split |
|
196 1 changesets pruned |
|
197 1 new unstable changesets |
|
198 $ hg log -G |
|
199 @ 4:2a4ccc0bb20c@default(draft) add bprimesplit2 |
|
200 | |
|
201 o 3:8b87864bd0f4@default(draft) add bprimesplit1 |
|
202 | |
|
203 | o 2:102002290587@default(draft) add _c |
|
204 | | |
|
205 | x 1:37445b16603b@default(draft) add _b |
|
206 |/ |
|
207 o 0:135f39f4bd78@default(draft) add _a |
|
208 |
|
209 |
|
210 $ hg evo --all --any --unstable |
|
211 does not handle split parents yet |
|
212 $ hg log -G |
|
213 @ 4:2a4ccc0bb20c@default(draft) add bprimesplit2 |
|
214 | |
|
215 o 3:8b87864bd0f4@default(draft) add bprimesplit1 |
|
216 | |
|
217 | o 2:102002290587@default(draft) add _c |
|
218 | | |
|
219 | x 1:37445b16603b@default(draft) add _b |
|
220 |/ |
|
221 o 0:135f39f4bd78@default(draft) add _a |
|
222 |
|
223 |
|
224 |
|
225 $ cd .. |
|
226 |
|
227 =============================================================================== |
|
228 Test instability resolution for a changeset unstable because its parent |
|
229 is obsolete with multiple successors on one branches but in reverse |
|
230 order (cross-split). |
|
231 Not supported yet |
|
232 ============================================================================== |
|
233 |
|
234 $ hg init test5 |
|
235 $ cd test5 |
|
236 $ mkcommits _a _b _c |
|
237 $ hg up "desc(_a)" |
|
238 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
239 $ mkcommits bprimesplit1 bprimesplit2 |
|
240 created new head |
|
241 $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split |
|
242 1 changesets pruned |
|
243 1 new unstable changesets |
|
244 $ hg up "desc(_a)" |
|
245 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
246 $ mkcommits bsecondsplit1 bsecondsplit2 |
|
247 created new head |
|
248 $ hg prune "desc(bprimesplit1)" -s "desc(bsecondsplit2)" |
|
249 1 changesets pruned |
|
250 1 new unstable changesets |
|
251 $ hg prune "desc(bprimesplit2)" -s "desc(bsecondsplit1)" |
|
252 1 changesets pruned |
|
253 $ hg log -G |
|
254 @ 6:59b942dbda14@default(draft) add bsecondsplit2 |
|
255 | |
|
256 o 5:8ffdae67d696@default(draft) add bsecondsplit1 |
|
257 | |
|
258 | o 2:102002290587@default(draft) add _c |
|
259 | | |
|
260 | x 1:37445b16603b@default(draft) add _b |
|
261 |/ |
|
262 o 0:135f39f4bd78@default(draft) add _a |
|
263 |
|
264 |
|
265 $ hg evo --all --any --unstable |
|
266 does not handle split parents yet |
|
267 $ hg log -G |
|
268 @ 6:59b942dbda14@default(draft) add bsecondsplit2 |
|
269 | |
|
270 o 5:8ffdae67d696@default(draft) add bsecondsplit1 |
|
271 | |
|
272 | o 2:102002290587@default(draft) add _c |
|
273 | | |
|
274 | x 1:37445b16603b@default(draft) add _b |
|
275 |/ |
|
276 o 0:135f39f4bd78@default(draft) add _a |
|
277 |
|
278 |
|
279 |
|
280 $ cd .. |
|
281 |
|
282 =============================================================================== |
|
283 Test instability resolution for a changeset unstable because its parent |
|
284 is obsolete with multiple successors on two branches. |
|
285 Not supported yet |
|
286 ============================================================================== |
|
287 |
|
288 $ hg init test6 |
|
289 $ cd test6 |
|
290 $ mkcommits _a _b _c |
|
291 $ hg up "desc(_a)" |
|
292 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
293 $ mkcommit bprimesplit1 |
|
294 created new head |
|
295 $ hg up "desc(_a)" |
|
296 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
297 $ mkcommit bprimesplit2 |
|
298 created new head |
|
299 $ hg prune "desc(_b)" -s "desc(bprimesplit1) + desc(bprimesplit2)" --split |
|
300 1 changesets pruned |
|
301 1 new unstable changesets |
|
302 $ hg log -G |
|
303 @ 4:3c69ea6aa93e@default(draft) add bprimesplit2 |
|
304 | |
|
305 | o 3:8b87864bd0f4@default(draft) add bprimesplit1 |
|
306 |/ |
|
307 | o 2:102002290587@default(draft) add _c |
|
308 | | |
|
309 | x 1:37445b16603b@default(draft) add _b |
|
310 |/ |
|
311 o 0:135f39f4bd78@default(draft) add _a |
|
312 |
|
313 |
|
314 $ hg evo --all --any --unstable |
|
315 does not handle split parents yet |
|
316 $ hg log -G |
|
317 @ 4:3c69ea6aa93e@default(draft) add bprimesplit2 |
|
318 | |
|
319 | o 3:8b87864bd0f4@default(draft) add bprimesplit1 |
|
320 |/ |
|
321 | o 2:102002290587@default(draft) add _c |
|
322 | | |
|
323 | x 1:37445b16603b@default(draft) add _b |
|
324 |/ |
|
325 o 0:135f39f4bd78@default(draft) add _a |
|
326 |
|
327 |
|
328 |
|
329 $ cd .. |
|
330 |