| 1 |
#testcases continuecommand continueflag |
| 2 |
This emulates the effects of an hg pull --rebase in which the remote repo |
| 3 |
already has one local mq patch |
| 4 |
|
| 5 |
$ cat >> $HGRCPATH <<EOF |
| 6 |
> [extensions] |
| 7 |
> rebase= |
| 8 |
> mq= |
| 9 |
> |
| 10 |
> [phases] |
| 11 |
> publish=False |
| 12 |
> |
| 13 |
> [alias] |
| 14 |
> tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n" |
| 15 |
> EOF |
| 16 |
|
| 17 |
#if continueflag |
| 18 |
$ cat >> $HGRCPATH <<EOF |
| 19 |
> [alias] |
| 20 |
> continue = rebase --continue |
| 21 |
> EOF |
| 22 |
#endif |
| 23 |
|
| 24 |
$ hg init a |
| 25 |
$ cd a |
| 26 |
$ hg qinit -c |
| 27 |
|
| 28 |
$ echo c1 > c1 |
| 29 |
$ hg add c1 |
| 30 |
$ hg ci -m C1 |
| 31 |
|
| 32 |
$ echo r1 > r1 |
| 33 |
$ hg add r1 |
| 34 |
$ hg ci -m R1 |
| 35 |
|
| 36 |
$ hg up -q 0 |
| 37 |
|
| 38 |
$ hg qnew p0.patch -d '1 0' |
| 39 |
$ echo p0 > p0 |
| 40 |
$ hg add p0 |
| 41 |
$ hg qref -m P0 |
| 42 |
|
| 43 |
$ hg qnew p1.patch -d '2 0' |
| 44 |
$ echo p1 > p1 |
| 45 |
$ hg add p1 |
| 46 |
$ hg qref -m P1 |
| 47 |
|
| 48 |
$ hg export qtip > p1.patch |
| 49 |
|
| 50 |
$ hg up -q -C 1 |
| 51 |
|
| 52 |
$ hg import p1.patch |
| 53 |
applying p1.patch |
| 54 |
|
| 55 |
$ rm p1.patch |
| 56 |
|
| 57 |
$ hg up -q -C qtip |
| 58 |
|
| 59 |
$ hg rebase -v |
| 60 |
rebasing 2:13a46ce44f60 p0.patch qbase "P0" |
| 61 |
resolving manifests |
| 62 |
removing p0 |
| 63 |
getting r1 |
| 64 |
resolving manifests |
| 65 |
getting p0 |
| 66 |
committing files: |
| 67 |
p0 |
| 68 |
committing manifest |
| 69 |
committing changelog |
| 70 |
rebasing 3:148775c71080 p1.patch qtip "P1" |
| 71 |
resolving manifests |
| 72 |
note: not rebasing 3:148775c71080 p1.patch qtip "P1", its destination already has all its changes |
| 73 |
rebase merging completed |
| 74 |
updating mq patch p0.patch to 5:9ecc820b1737 |
| 75 |
$TESTTMP/a/.hg/patches/p0.patch |
| 76 |
2 changesets found |
| 77 |
uncompressed size of bundle content: |
| 78 |
352 (changelog) |
| 79 |
328 (manifests) |
| 80 |
131 p0 |
| 81 |
131 p1 |
| 82 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-rebase.hg |
| 83 |
2 changesets found |
| 84 |
uncompressed size of bundle content: |
| 85 |
407 (changelog) |
| 86 |
328 (manifests) |
| 87 |
131 p0 |
| 88 |
131 p1 |
| 89 |
adding branch |
| 90 |
adding changesets |
| 91 |
adding manifests |
| 92 |
adding file changes |
| 93 |
added 2 changesets with 2 changes to 2 files |
| 94 |
rebase completed |
| 95 |
1 revisions have been skipped |
| 96 |
|
| 97 |
$ hg tglog |
| 98 |
@ 3: 9ecc820b1737 'P0' tags: p0.patch qbase qtip tip |
| 99 |
| |
| 100 |
o 2: 869d8b134a27 'P1' tags: qparent |
| 101 |
| |
| 102 |
o 1: da108f2755df 'R1' tags: |
| 103 |
| |
| 104 |
o 0: cd320d50b341 'C1' tags: |
| 105 |
|
| 106 |
$ cd .. |
| 107 |
|
| 108 |
|
| 109 |
$ hg init b |
| 110 |
$ cd b |
| 111 |
$ hg qinit -c |
| 112 |
|
| 113 |
$ for i in r0 r1 r2 r3 r4 r5 r6; |
| 114 |
> do |
| 115 |
> echo $i > $i |
| 116 |
> hg ci -Am $i |
| 117 |
> done |
| 118 |
adding r0 |
| 119 |
adding r1 |
| 120 |
adding r2 |
| 121 |
adding r3 |
| 122 |
adding r4 |
| 123 |
adding r5 |
| 124 |
adding r6 |
| 125 |
|
| 126 |
$ hg qimport -r 1:tip |
| 127 |
|
| 128 |
$ hg up -q 0 |
| 129 |
|
| 130 |
$ for i in r1 r3 r7 r8; |
| 131 |
> do |
| 132 |
> echo $i > $i |
| 133 |
> hg ci -Am branch2-$i |
| 134 |
> done |
| 135 |
adding r1 |
| 136 |
created new head |
| 137 |
adding r3 |
| 138 |
adding r7 |
| 139 |
adding r8 |
| 140 |
|
| 141 |
$ echo somethingelse > r4 |
| 142 |
$ hg ci -Am branch2-r4 |
| 143 |
adding r4 |
| 144 |
|
| 145 |
$ echo r6 > r6 |
| 146 |
$ hg ci -Am branch2-r6 |
| 147 |
adding r6 |
| 148 |
|
| 149 |
$ hg up -q qtip |
| 150 |
|
| 151 |
$ HGMERGE=internal:fail hg rebase |
| 152 |
rebasing 1:b4bffa6e4776 qbase r1 "r1" |
| 153 |
note: not rebasing 1:b4bffa6e4776 qbase r1 "r1", its destination already has all its changes |
| 154 |
rebasing 2:c0fd129beb01 r2 "r2" |
| 155 |
rebasing 3:6ff5b8feed8e r3 "r3" |
| 156 |
note: not rebasing 3:6ff5b8feed8e r3 "r3", its destination already has all its changes |
| 157 |
rebasing 4:094320fec554 r4 "r4" |
| 158 |
unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
| 159 |
[240] |
| 160 |
|
| 161 |
$ HGMERGE=internal:local hg resolve --all |
| 162 |
(no more unresolved files) |
| 163 |
continue: hg rebase --continue |
| 164 |
|
| 165 |
$ hg continue |
| 166 |
already rebased 1:b4bffa6e4776 qbase r1 "r1" as 057f55ff8f44 |
| 167 |
already rebased 2:c0fd129beb01 r2 "r2" as 1660ab13ce9a |
| 168 |
already rebased 3:6ff5b8feed8e r3 "r3" as 1660ab13ce9a |
| 169 |
rebasing 4:094320fec554 r4 "r4" |
| 170 |
note: not rebasing 4:094320fec554 r4 "r4", its destination already has all its changes |
| 171 |
rebasing 5:681a378595ba r5 "r5" |
| 172 |
rebasing 6:512a1f24768b qtip r6 "r6" |
| 173 |
note: not rebasing 6:512a1f24768b qtip r6 "r6", its destination already has all its changes |
| 174 |
saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-rebase.hg |
| 175 |
|
| 176 |
$ hg tglog |
| 177 |
@ 8: 0b9735ce8f0a 'r5' tags: qtip r5 tip |
| 178 |
| |
| 179 |
o 7: 1660ab13ce9a 'r2' tags: qbase r2 |
| 180 |
| |
| 181 |
o 6: 057f55ff8f44 'branch2-r6' tags: qparent |
| 182 |
| |
| 183 |
o 5: 1d7287f8deb1 'branch2-r4' tags: |
| 184 |
| |
| 185 |
o 4: 3c10b9db2bd5 'branch2-r8' tags: |
| 186 |
| |
| 187 |
o 3: b684023158dc 'branch2-r7' tags: |
| 188 |
| |
| 189 |
o 2: d817754b1251 'branch2-r3' tags: |
| 190 |
| |
| 191 |
o 1: 0621a206f8a4 'branch2-r1' tags: |
| 192 |
| |
| 193 |
o 0: 222799e2f90b 'r0' tags: |
| 194 |
|
| 195 |
|
| 196 |
$ cd .. |