##// END OF EJS Templates
tests: use drawdag in test-rebase-collapse.t...
Martin von Zweigbergk -
r37257:dd2833e4 default
parent child Browse files
Show More
This diff has been collapsed as it changes many lines, (653 lines changed) Show them Hide them
@@ -2,6 +2,7 b''
2 2 > [extensions]
3 3 > rebase=
4 4 > mq=
5 > drawdag=$TESTDIR/drawdag.py
5 6 >
6 7 > [phases]
7 8 > publish=False
@@ -11,47 +12,21 b''
11 12 > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
12 13 > EOF
13 14
14 Create repo a:
15
16 $ hg init a
17 $ cd a
18 $ hg unbundle "$TESTDIR/bundles/rebase.hg"
19 adding changesets
20 adding manifests
21 adding file changes
22 added 8 changesets with 7 changes to 7 files (+2 heads)
23 new changesets cd010b8cd998:02de42196ebe
24 (run 'hg heads' to see heads, 'hg merge' to merge)
25 $ hg up tip
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 Highest phase of source commits is used:
27 16
28 $ hg tglog
29 @ 7: 02de42196ebe 'H'
30 |
31 | o 6: eea13746799a 'G'
32 |/|
33 o | 5: 24b6387c8c8c 'F'
34 | |
35 | o 4: 9520eea781bc 'E'
36 |/
37 | o 3: 32af7686d403 'D'
38 | |
39 | o 2: 5fddd98957c8 'C'
40 | |
41 | o 1: 42ccdea3bb16 'B'
42 |/
43 o 0: cd010b8cd998 'A'
44
45 $ cd ..
17 $ hg init phase
18 $ cd phase
19 $ hg debugdrawdag << 'EOF'
20 > D
21 > |
22 > F C
23 > | |
24 > E B
25 > |/
26 > A
27 > EOF
46 28
47
48 Rebasing B onto H and collapsing changesets with different phases:
49
50
51 $ hg clone -q -u 3 a a1
52 $ cd a1
53
54 $ hg phase --force --secret 3
29 $ hg phase --force --secret D
55 30
56 31 $ cat > $TESTTMP/editor.sh <<EOF
57 32 > echo "==== before editing"
@@ -59,10 +34,10 b' Rebasing B onto H and collapsing changes'
59 34 > echo "===="
60 35 > echo "edited manually" >> \$1
61 36 > EOF
62 $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7
63 rebasing 1:42ccdea3bb16 "B"
64 rebasing 2:5fddd98957c8 "C"
65 rebasing 3:32af7686d403 "D"
37 $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest F
38 rebasing 1:112478962961 "B" (B)
39 rebasing 3:26805aba1e60 "C" (C)
40 rebasing 5:f585351a92f8 "D" (D tip)
66 41 ==== before editing
67 42 Collapsed revision
68 43 * B
@@ -73,84 +48,91 b' Rebasing B onto H and collapsing changes'
73 48 HG: Enter commit message. Lines beginning with 'HG:' are removed.
74 49 HG: Leave message empty to abort commit.
75 50 HG: --
76 HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
51 HG: user: test
77 52 HG: branch 'default'
78 53 HG: added B
79 54 HG: added C
80 55 HG: added D
81 56 ====
82 saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg
57 saved backup bundle to $TESTTMP/phase/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg
83 58
84 59 $ hg tglogp
85 @ 5: 30882080ba93 secret 'Collapsed revision
60 o 3: 92fa5f5fe108 secret 'Collapsed revision
86 61 | * B
87 62 | * C
88 63 | * D
89 64 |
90 65 |
91 66 | edited manually'
92 o 4: 02de42196ebe draft 'H'
67 o 2: 64a8289d2492 draft 'F'
93 68 |
94 | o 3: eea13746799a draft 'G'
95 |/|
96 o | 2: 24b6387c8c8c draft 'F'
97 | |
98 | o 1: 9520eea781bc draft 'E'
99 |/
100 o 0: cd010b8cd998 draft 'A'
69 o 1: 7fb047a69f22 draft 'E'
70 |
71 o 0: 426bada5c675 draft 'A'
101 72
102 73 $ hg manifest --rev tip
103 74 A
104 75 B
105 76 C
106 77 D
78 E
107 79 F
108 H
109 80
110 81 $ cd ..
111 82
112 83
113 Rebasing E onto H:
84 Merge gets linearized:
114 85
115 $ hg clone -q -u . a a2
116 $ cd a2
86 $ hg init linearized-merge
87 $ cd linearized-merge
117 88
118 $ hg phase --force --secret 6
119 $ hg rebase --source 4 --collapse --dest 7
120 rebasing 4:9520eea781bc "E"
121 rebasing 6:eea13746799a "G"
122 saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
89 $ hg debugdrawdag << 'EOF'
90 > F D
91 > |/|
92 > C B
93 > |/
94 > A
95 > EOF
96
97 $ hg phase --force --secret D
98 $ hg rebase --source B --collapse --dest F
99 rebasing 1:112478962961 "B" (B)
100 rebasing 3:4e4f9194f9f1 "D" (D)
101 saved backup bundle to $TESTTMP/linearized-merge/.hg/strip-backup/112478962961-e389075b-rebase.hg
123 102
124 103 $ hg tglog
125 o 6: 7dd333a2d1e4 'Collapsed revision
126 | * E
127 | * G'
128 @ 5: 02de42196ebe 'H'
129 |
130 o 4: 24b6387c8c8c 'F'
104 o 3: 5bdc08b7da2b 'Collapsed revision
105 | * B
106 | * D'
107 o 2: afc707c82df0 'F'
131 108 |
132 | o 3: 32af7686d403 'D'
133 | |
134 | o 2: 5fddd98957c8 'C'
135 | |
136 | o 1: 42ccdea3bb16 'B'
137 |/
138 o 0: cd010b8cd998 'A'
109 o 1: dc0947a82db8 'C'
110 |
111 o 0: 426bada5c675 'A'
139 112
140 113 $ hg manifest --rev tip
141 114 A
142 E
115 B
116 C
143 117 F
144 H
145 118
146 119 $ cd ..
147 120
148 Rebasing G onto H with custom message:
121 Custom message:
122
123 $ hg init message
124 $ cd message
149 125
150 $ hg clone -q -u . a a3
151 $ cd a3
126 $ hg debugdrawdag << 'EOF'
127 > C
128 > |
129 > D B
130 > |/
131 > A
132 > EOF
152 133
153 $ hg rebase --base 6 -m 'custom message'
134
135 $ hg rebase --base B -m 'custom message'
154 136 abort: message can only be specified with collapse
155 137 [255]
156 138
@@ -158,144 +140,77 b' Rebasing G onto H with custom message:'
158 140 > env | grep HGEDITFORM
159 141 > true
160 142 > EOF
161 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7
162 rebasing 4:9520eea781bc "E"
163 rebasing 6:eea13746799a "G"
143 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source B --collapse -m 'custom message' -e --dest D
144 rebasing 1:112478962961 "B" (B)
145 rebasing 3:26805aba1e60 "C" (C tip)
164 146 HGEDITFORM=rebase.collapse
165 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
147 saved backup bundle to $TESTTMP/message/.hg/strip-backup/112478962961-f4131707-rebase.hg
166 148
167 149 $ hg tglog
168 o 6: 38ed6a6b026b 'custom message'
169 |
170 @ 5: 02de42196ebe 'H'
171 |
172 o 4: 24b6387c8c8c 'F'
150 o 2: 2f197b9a08f3 'custom message'
173 151 |
174 | o 3: 32af7686d403 'D'
175 | |
176 | o 2: 5fddd98957c8 'C'
177 | |
178 | o 1: 42ccdea3bb16 'B'
179 |/
180 o 0: cd010b8cd998 'A'
152 o 1: b18e25de2cf5 'D'
153 |
154 o 0: 426bada5c675 'A'
181 155
182 156 $ hg manifest --rev tip
183 157 A
184 E
185 F
186 H
158 B
159 C
160 D
187 161
188 162 $ cd ..
189 163
190 Create repo b:
191
192 $ hg init b
193 $ cd b
194
195 $ echo A > A
196 $ hg ci -Am A
197 adding A
198 $ echo B > B
199 $ hg ci -Am B
200 adding B
201
202 $ hg up -q 0
203
204 $ echo C > C
205 $ hg ci -Am C
206 adding C
207 created new head
208
209 $ hg merge
210 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
211 (branch merge, don't forget to commit)
212
213 $ echo D > D
214 $ hg ci -Am D
215 adding D
216
217 $ hg up -q 1
218
219 $ echo E > E
220 $ hg ci -Am E
221 adding E
222 created new head
223
224 $ echo F > F
225 $ hg ci -Am F
226 adding F
227
228 $ hg merge
229 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
230 (branch merge, don't forget to commit)
231 $ hg ci -m G
232
233 $ hg up -q 0
234
235 $ echo H > H
236 $ hg ci -Am H
237 adding H
238 created new head
239
240 $ hg tglog
241 @ 7: c65502d41787 'H'
242 |
243 | o 6: c772a8b2dc17 'G'
244 | |\
245 | | o 5: 7f219660301f 'F'
246 | | |
247 | | o 4: 8a5212ebc852 'E'
248 | | |
249 | o | 3: 2870ad076e54 'D'
250 | |\|
251 | o | 2: c5cefa58fd55 'C'
252 |/ /
253 | o 1: 27547f69f254 'B'
254 |/
255 o 0: 4a2df7238c3b 'A'
256
257 $ cd ..
258
259
260 164 Rebase and collapse - more than one external (fail):
261 165
262 $ hg clone -q -u . b b1
263 $ cd b1
166 $ hg init multiple-external-parents
167 $ cd multiple-external-parents
264 168
265 $ hg rebase -s 2 --dest 7 --collapse
266 abort: unable to collapse on top of 7, there is more than one external parent: 1, 5
169 $ hg debugdrawdag << 'EOF'
170 > G
171 > |\
172 > | F
173 > | |
174 > D E
175 > |\|
176 > H C B
177 > \|/
178 > A
179 > EOF
180
181 $ hg rebase -s C --dest H --collapse
182 abort: unable to collapse on top of 3, there is more than one external parent: 1, 6
267 183 [255]
268 184
269 185 Rebase and collapse - E onto H:
270 186
271 $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge
272 rebasing 4:8a5212ebc852 "E"
273 rebasing 5:7f219660301f "F"
274 rebasing 6:c772a8b2dc17 "G"
275 saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg
187 $ hg rebase -s E --dest I --collapse # root (E) is not a merge
188 abort: unknown revision 'I'!
189 [255]
276 190
277 191 $ hg tglog
278 o 5: f97c4725bd99 'Collapsed revision
279 |\ * E
280 | | * F
281 | | * G'
282 | @ 4: c65502d41787 'H'
192 o 7: 64e264db77f0 'G'
193 |\
194 | o 6: 11abe3fb10b8 'F'
195 | |
196 | o 5: 49cb92066bfd 'E'
283 197 | |
284 o | 3: 2870ad076e54 'D'
285 |\ \
286 | o | 2: c5cefa58fd55 'C'
287 | |/
288 o / 1: 27547f69f254 'B'
198 o | 4: 4e4f9194f9f1 'D'
199 |\|
200 | | o 3: 575c4b5ec114 'H'
201 | | |
202 o---+ 2: dc0947a82db8 'C'
203 / /
204 o / 1: 112478962961 'B'
289 205 |/
290 o 0: 4a2df7238c3b 'A'
206 o 0: 426bada5c675 'A'
291 207
292 208 $ hg manifest --rev tip
293 209 A
210 B
294 211 C
295 D
296 212 E
297 213 F
298 H
299 214
300 215 $ cd ..
301 216
@@ -308,146 +223,98 b' the parent of a node that is a child of '
308 223 3). The code is now much simpler and we could just test a simpler scenario
309 224 We keep it the test this way in case new complexity is injected.
310 225
311 $ hg clone -q -u . b b2
312 $ cd b2
226 Create repo b:
227
228 $ hg init branch-heads
229 $ cd branch-heads
230
231 $ hg debugdrawdag << 'EOF'
232 > G
233 > |\
234 > | F
235 > | |
236 > D E
237 > |\|
238 > H C B
239 > \|/
240 > A
241 > EOF
313 242
314 243 $ hg heads --template="{rev}:{node} {branch}\n"
315 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
316 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
244 7:64e264db77f061f16d9132b70c5a58e2461fb630 default
245 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
317 246
318 $ cat $TESTTMP/b2/.hg/cache/branch2-served
319 c65502d4178782309ce0574c5ae6ee9485a9bafa 7
320 c772a8b2dc17629cec88a19d09c926c4814b12c7 o default
321 c65502d4178782309ce0574c5ae6ee9485a9bafa o default
247 $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
248 64e264db77f061f16d9132b70c5a58e2461fb630 7
249 575c4b5ec114d64b681d33f8792853568bfb2b2c o default
250 64e264db77f061f16d9132b70c5a58e2461fb630 o default
322 251
323 252 $ hg strip 4
324 saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg
253 saved backup bundle to $TESTTMP/branch-heads/.hg/strip-backup/4e4f9194f9f1-5ec4b5e6-backup.hg
325 254
326 $ cat $TESTTMP/b2/.hg/cache/branch2-served
327 c65502d4178782309ce0574c5ae6ee9485a9bafa 4
328 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default
329 c65502d4178782309ce0574c5ae6ee9485a9bafa o default
255 $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
256 11abe3fb10b8689b560681094b17fe161871d043 5
257 dc0947a82db884575bb76ea10ac97b08536bfa03 o default
258 575c4b5ec114d64b681d33f8792853568bfb2b2c o default
259 11abe3fb10b8689b560681094b17fe161871d043 o default
330 260
331 261 $ hg heads --template="{rev}:{node} {branch}\n"
332 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
333 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
262 5:11abe3fb10b8689b560681094b17fe161871d043 default
263 3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
264 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default
334 265
335 266 $ cd ..
336 267
337 268
338 269
339
340
341
342 Create repo c:
343
344 $ hg init c
345 $ cd c
270 Preserves external parent
346 271
347 $ echo A > A
348 $ hg ci -Am A
349 adding A
350 $ echo B > B
351 $ hg ci -Am B
352 adding B
353
354 $ hg up -q 0
355
356 $ echo C > C
357 $ hg ci -Am C
358 adding C
359 created new head
360
361 $ hg merge
362 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
363 (branch merge, don't forget to commit)
272 $ hg init external-parent
273 $ cd external-parent
364 274
365 $ echo D > D
366 $ hg ci -Am D
367 adding D
368
369 $ hg up -q 1
370
371 $ echo E > E
372 $ hg ci -Am E
373 adding E
374 created new head
375 $ echo F > E
376 $ hg ci -m 'F'
275 $ hg debugdrawdag << 'EOF'
276 > H
277 > |\
278 > | G
279 > | |
280 > | F # F/E = F\n
281 > | |
282 > D E # D/D = D\n
283 > |\|
284 > I C B
285 > \|/
286 > A
287 > EOF
377 288
378 $ echo G > G
379 $ hg ci -Am G
380 adding G
381
382 $ hg merge
383 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
384 (branch merge, don't forget to commit)
385
386 $ hg ci -m H
387
388 $ hg up -q 0
389
390 $ echo I > I
391 $ hg ci -Am I
392 adding I
393 created new head
289 $ hg rebase -s F --dest I --collapse # root (F) is not a merge
290 rebasing 6:c82b08f646f1 "F" (F)
291 rebasing 7:a6db7fa104e1 "G" (G)
292 rebasing 8:e1d201b72d91 "H" (H tip)
293 saved backup bundle to $TESTTMP/external-parent/.hg/strip-backup/c82b08f646f1-f2721fbf-rebase.hg
394 294
395 295 $ hg tglog
396 @ 8: 46d6f0e29c20 'I'
397 |
398 | o 7: 417d3b648079 'H'
399 | |\
400 | | o 6: 55a44ad28289 'G'
401 | | |
402 | | o 5: dca5924bb570 'F'
403 | | |
404 | | o 4: 8a5212ebc852 'E'
405 | | |
406 | o | 3: 2870ad076e54 'D'
407 | |\|
408 | o | 2: c5cefa58fd55 'C'
409 |/ /
410 | o 1: 27547f69f254 'B'
411 |/
412 o 0: 4a2df7238c3b 'A'
413
414 $ cd ..
415
416
417 Rebase and collapse - E onto I:
418
419 $ hg clone -q -u . c c1
420 $ cd c1
421
422 $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge
423 rebasing 4:8a5212ebc852 "E"
424 rebasing 5:dca5924bb570 "F"
425 merging E
426 rebasing 6:55a44ad28289 "G"
427 rebasing 7:417d3b648079 "H"
428 saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg
429
430 $ hg tglog
431 o 5: 340b34a63b39 'Collapsed revision
432 |\ * E
433 | | * F
296 o 6: 681daa3e686d 'Collapsed revision
297 |\ * F
434 298 | | * G
435 299 | | * H'
436 | @ 4: 46d6f0e29c20 'I'
437 | |
438 o | 3: 2870ad076e54 'D'
439 |\ \
440 | o | 2: c5cefa58fd55 'C'
441 | |/
442 o / 1: 27547f69f254 'B'
300 | | o 5: 49cb92066bfd 'E'
301 | | |
302 | o | 4: 09143c0bf13e 'D'
303 | |\|
304 o | | 3: 08ebfeb61bac 'I'
305 | | |
306 | o | 2: dc0947a82db8 'C'
307 |/ /
308 | o 1: 112478962961 'B'
443 309 |/
444 o 0: 4a2df7238c3b 'A'
310 o 0: 426bada5c675 'A'
445 311
446 312 $ hg manifest --rev tip
447 313 A
448 314 C
449 315 D
450 316 E
317 F
451 318 G
452 319 I
453 320
@@ -458,77 +325,38 b' Rebase and collapse - E onto I:'
458 325 $ cd ..
459 326
460 327
461 Create repo d:
462
463 $ hg init d
464 $ cd d
328 With internal merge:
465 329
466 $ echo A > A
467 $ hg ci -Am A
468 adding A
469 $ echo B > B
470 $ hg ci -Am B
471 adding B
472 $ echo C > C
473 $ hg ci -Am C
474 adding C
475
476 $ hg up -q 1
330 $ hg init internal-merge
331 $ cd internal-merge
477 332
478 $ echo D > D
479 $ hg ci -Am D
480 adding D
481 created new head
482 $ hg merge
483 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
484 (branch merge, don't forget to commit)
333 $ hg debugdrawdag << 'EOF'
334 > E
335 > |\
336 > C D
337 > |/
338 > F B
339 > |/
340 > A
341 > EOF
485 342
486 $ hg ci -m E
487 343
488 $ hg up -q 0
489
490 $ echo F > F
491 $ hg ci -Am F
492 adding F
493 created new head
344 $ hg rebase -s B --collapse --dest F
345 rebasing 1:112478962961 "B" (B)
346 rebasing 3:26805aba1e60 "C" (C)
347 rebasing 4:be0ef73c17ad "D" (D)
348 rebasing 5:02c4367d6973 "E" (E tip)
349 saved backup bundle to $TESTTMP/internal-merge/.hg/strip-backup/112478962961-1dfb057b-rebase.hg
494 350
495 351 $ hg tglog
496 @ 5: c137c2b8081f 'F'
497 |
498 | o 4: 0a42590ed746 'E'
499 | |\
500 | | o 3: 7bbcd6078bcc 'D'
501 | | |
502 | o | 2: f838bfaca5c7 'C'
503 | |/
504 | o 1: 27547f69f254 'B'
505 |/
506 o 0: 4a2df7238c3b 'A'
507
508 $ cd ..
509
510
511 Rebase and collapse - B onto F:
512
513 $ hg clone -q -u . d d1
514 $ cd d1
515
516 $ hg rebase -s 1 --collapse --dest 5
517 rebasing 1:27547f69f254 "B"
518 rebasing 2:f838bfaca5c7 "C"
519 rebasing 3:7bbcd6078bcc "D"
520 rebasing 4:0a42590ed746 "E"
521 saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg
522
523 $ hg tglog
524 o 2: b72eaccb283f 'Collapsed revision
352 o 2: c0512a1797b0 'Collapsed revision
525 353 | * B
526 354 | * C
527 355 | * D
528 356 | * E'
529 @ 1: c137c2b8081f 'F'
357 o 1: 8908a377a434 'F'
530 358 |
531 o 0: 4a2df7238c3b 'A'
359 o 0: 426bada5c675 'A'
532 360
533 361 $ hg manifest --rev tip
534 362 A
@@ -536,9 +364,9 b' Rebase and collapse - B onto F:'
536 364 C
537 365 D
538 366 F
367 $ cd ..
539 368
540 369 Interactions between collapse and keepbranches
541 $ cd ..
542 370 $ hg init e
543 371 $ cd e
544 372 $ echo 'a' > a
@@ -733,46 +561,28 b' Test stripping a revision with another c'
733 561 $ hg init f
734 562 $ cd f
735 563
736 $ echo A > A
737 $ hg ci -Am A
738 adding A
739 $ echo B > B
740 $ hg ci -Am B
741 adding B
564 $ hg debugdrawdag << 'EOF'
565 > C B
566 > |/
567 > A
568 > EOF
742 569
743 $ hg up -q 0
570 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
571 2:dc0947a82db884575bb76ea10ac97b08536bfa03 default: C
572 1:112478962961147124edd43549aedd1a335e44bf default: B
744 573
745 $ echo C > C
746 $ hg ci -Am C
747 adding C
748 created new head
574 $ hg strip C
575 saved backup bundle to $TESTTMP/f/.hg/strip-backup/dc0947a82db8-d21b92a4-backup.hg
749 576
750 577 $ hg tglog
751 @ 2: c5cefa58fd55 'C'
578 o 1: 112478962961 'B'
752 579 |
753 | o 1: 27547f69f254 'B'
754 |/
755 o 0: 4a2df7238c3b 'A'
580 o 0: 426bada5c675 'A'
756 581
757 582
758 583
759 584 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
760 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
761 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
762
763 $ hg strip 2
764 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
765 saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg
766
767 $ hg tglog
768 o 1: 27547f69f254 'B'
769 |
770 @ 0: 4a2df7238c3b 'A'
771
772
773
774 $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
775 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
585 1:112478962961147124edd43549aedd1a335e44bf default: B
776 586
777 587 $ cd ..
778 588
@@ -812,46 +622,41 b' running into merge conflict and invoking'
812 622
813 623 $ hg init collapse_remember_message
814 624 $ cd collapse_remember_message
815 $ touch a
816 $ hg add a
817 $ hg commit -m "a"
818 $ echo "a-default" > a
819 $ hg commit -m "a-default"
820 $ hg update -r 0
821 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
822 $ hg branch dev
823 marked working directory as branch dev
824 (branches are permanent and global, did you want a bookmark?)
825 $ echo "a-dev" > a
826 $ hg commit -m "a-dev"
827 $ hg rebase --collapse -m "a-default-dev" -d 1
828 rebasing 2:b8d8db2b242d "a-dev" (tip)
829 merging a
830 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
625 $ hg debugdrawdag << 'EOF'
626 > C B # B/A = B\n
627 > |/ # C/A = C\n
628 > A
629 > EOF
630 $ hg rebase --collapse -m "new message" -b B -d C
631 rebasing 1:81e5401e4d37 "B" (B)
632 merging A
633 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
831 634 unresolved conflicts (see hg resolve, then hg rebase --continue)
832 635 [1]
833 $ rm a.orig
834 $ hg resolve --mark a
636 $ rm A.orig
637 $ hg resolve --mark A
835 638 (no more unresolved files)
836 639 continue: hg rebase --continue
837 640 $ hg rebase --continue
838 rebasing 2:b8d8db2b242d "a-dev" (tip)
839 saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg
641 rebasing 1:81e5401e4d37 "B" (B)
642 saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/81e5401e4d37-96c3dd30-rebase.hg
840 643 $ hg log
841 changeset: 2:45ba1d1a8665
644 changeset: 2:17186933e123
842 645 tag: tip
843 646 user: test
844 647 date: Thu Jan 01 00:00:00 1970 +0000
845 summary: a-default-dev
648 summary: new message
846 649
847 changeset: 1:3c8db56a44bc
650 changeset: 1:043039e9df84
651 tag: C
848 652 user: test
849 653 date: Thu Jan 01 00:00:00 1970 +0000
850 summary: a-default
654 summary: C
851 655
852 changeset: 0:3903775176ed
656 changeset: 0:426bada5c675
657 tag: A
853 658 user: test
854 659 date: Thu Jan 01 00:00:00 1970 +0000
855 summary: a
660 summary: A
856 661
857 662 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now