| 1 |
#testcases continuecommand continueflag |
| 2 |
Test rebase --continue with rebasestate written by legacy client |
| 3 |
|
| 4 |
$ cat >> $HGRCPATH <<EOF |
| 5 |
> [extensions] |
| 6 |
> rebase= |
| 7 |
> drawdag=$TESTDIR/drawdag.py |
| 8 |
> EOF |
| 9 |
|
| 10 |
#if continueflag |
| 11 |
$ cat >> $HGRCPATH <<EOF |
| 12 |
> [alias] |
| 13 |
> continue = rebase --continue |
| 14 |
> EOF |
| 15 |
#endif |
| 16 |
|
| 17 |
$ hg init |
| 18 |
$ hg debugdrawdag <<'EOF' |
| 19 |
> D H |
| 20 |
> | | |
| 21 |
> C G |
| 22 |
> | | |
| 23 |
> B F |
| 24 |
> | | |
| 25 |
> Z A E |
| 26 |
> \|/ |
| 27 |
> R |
| 28 |
> EOF |
| 29 |
$ for r in A B C D E F G H R Z |
| 30 |
> do |
| 31 |
> eval node_$r=$(hg log -r $r -T '{node}') |
| 32 |
> done |
| 33 |
|
| 34 |
rebasestate generated by a legacy client running "hg rebase -r B+D+E+G+H -d Z" |
| 35 |
|
| 36 |
$ touch .hg/last-message.txt |
| 37 |
$ cat > .hg/rebasestate <<EOF |
| 38 |
> 0000000000000000000000000000000000000000 |
| 39 |
> $node_Z |
| 40 |
> 0000000000000000000000000000000000000000 |
| 41 |
> 0 |
| 42 |
> 0 |
| 43 |
> 0 |
| 44 |
> |
| 45 |
> $node_A:-2 |
| 46 |
> $node_E:0000000000000000000000000000000000000000 |
| 47 |
> $node_B:0000000000000000000000000000000000000000 |
| 48 |
> $node_F:-3 |
| 49 |
> $node_C:-3 |
| 50 |
> $node_G:0000000000000000000000000000000000000000 |
| 51 |
> $node_D:0000000000000000000000000000000000000000 |
| 52 |
> $node_H:0000000000000000000000000000000000000000 |
| 53 |
> EOF |
| 54 |
|
| 55 |
#if continuecommand |
| 56 |
$ hg continue --dry-run |
| 57 |
rebase in progress, will be resumed |
| 58 |
#endif |
| 59 |
|
| 60 |
$ hg continue |
| 61 |
rebasing 4:c1e6b162678d B "B" |
| 62 |
rebasing 8:6f7a236de685 D "D" |
| 63 |
rebasing 2:de008c61a447 E "E" |
| 64 |
rebasing 7:d2fa1c02b240 G "G" |
| 65 |
rebasing 9:6582e6951a9c H tip "H" |
| 66 |
warning: orphaned descendants detected, not stripping c1e6b162678d, de008c61a447 |
| 67 |
saved backup bundle to $TESTTMP/.hg/strip-backup/6f7a236de685-9880a3dc-rebase.hg |
| 68 |
|
| 69 |
$ hg log -G -T '{rev}:{node|short} {desc}\n' |
| 70 |
o 11:721b8da0a708 H |
| 71 |
| |
| 72 |
o 10:9d65695ec3c2 G |
| 73 |
| |
| 74 |
o 9:21c8397a5d68 E |
| 75 |
| |
| 76 |
| o 8:fc52970345e8 D |
| 77 |
| | |
| 78 |
| o 7:eac96551b107 B |
| 79 |
|/ |
| 80 |
| o 6:bd5548558fcf C |
| 81 |
| | |
| 82 |
| | o 5:aeba276fcb7d F |
| 83 |
| | | |
| 84 |
| o | 4:c1e6b162678d B |
| 85 |
| | | |
| 86 |
o | | 3:f424eb6a8c01 Z |
| 87 |
| | | |
| 88 |
+---o 2:de008c61a447 E |
| 89 |
| | |
| 90 |
| o 1:21a6c4502885 A |
| 91 |
|/ |
| 92 |
o 0:b41ce7760717 R |
| 93 |
|