Show More
@@ -1,901 +1,901 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cat <<EOF >> $HGRCPATH |
|
3 | 3 | > [extensions] |
|
4 | 4 | > mq = |
|
5 | 5 | > [diff] |
|
6 | 6 | > nodates = true |
|
7 | 7 | > EOF |
|
8 | 8 | $ catpatch() { |
|
9 | 9 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ |
|
10 | 10 | > -e "s/^\(# Parent \).*/\1/" |
|
11 | 11 | > } |
|
12 | 12 | $ catlog() { |
|
13 | 13 | > catpatch $1 |
|
14 | > hg log --template "{rev}: {desc} - {author}\n" | |
|
14 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
|
15 | 15 | > } |
|
16 | 16 | $ catlogd() { |
|
17 | 17 | > catpatch $1 |
|
18 | > hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
18 | > hg log --template "{rev}: {node|short} {desc} - {author} - {date}\n" | |
|
19 | 19 | > } |
|
20 | 20 | $ drop() { |
|
21 | 21 | > hg qpop |
|
22 | 22 | > hg qdel $1.patch |
|
23 | 23 | > } |
|
24 | 24 | $ runtest() { |
|
25 | 25 | > echo ==== init |
|
26 | 26 | > hg init a |
|
27 | 27 | > cd a |
|
28 | 28 | > hg qinit |
|
29 | 29 | > |
|
30 | 30 | > |
|
31 | 31 | > echo ==== qnew -d |
|
32 | 32 | > hg qnew -d '3 0' 1.patch |
|
33 | 33 | > catlogd 1 |
|
34 | 34 | > |
|
35 | 35 | > echo ==== qref |
|
36 | 36 | > echo "1" >1 |
|
37 | 37 | > hg add |
|
38 | 38 | > hg qref |
|
39 | 39 | > catlogd 1 |
|
40 | 40 | > |
|
41 | 41 | > echo ==== qref -d |
|
42 | 42 | > hg qref -d '4 0' |
|
43 | 43 | > catlogd 1 |
|
44 | 44 | > |
|
45 | 45 | > |
|
46 | 46 | > echo ==== qnew |
|
47 | 47 | > hg qnew 2.patch |
|
48 | 48 | > echo "2" >2 |
|
49 | 49 | > hg add |
|
50 | 50 | > hg qref |
|
51 | 51 | > catlog 2 |
|
52 | 52 | > |
|
53 | 53 | > echo ==== qref -d |
|
54 | 54 | > hg qref -d '5 0' |
|
55 | 55 | > catlog 2 |
|
56 | 56 | > |
|
57 | 57 | > drop 2 |
|
58 | 58 | > |
|
59 | 59 | > |
|
60 | 60 | > echo ==== qnew -d -m |
|
61 | 61 | > hg qnew -d '6 0' -m "Three" 3.patch |
|
62 | 62 | > catlogd 3 |
|
63 | 63 | > |
|
64 | 64 | > echo ==== qref |
|
65 | 65 | > echo "3" >3 |
|
66 | 66 | > hg add |
|
67 | 67 | > hg qref |
|
68 | 68 | > catlogd 3 |
|
69 | 69 | > |
|
70 | 70 | > echo ==== qref -m |
|
71 | 71 | > hg qref -m "Drei" |
|
72 | 72 | > catlogd 3 |
|
73 | 73 | > |
|
74 | 74 | > echo ==== qref -d |
|
75 | 75 | > hg qref -d '7 0' |
|
76 | 76 | > catlogd 3 |
|
77 | 77 | > |
|
78 | 78 | > echo ==== qref -d -m |
|
79 | 79 | > hg qref -d '8 0' -m "Three (again)" |
|
80 | 80 | > catlogd 3 |
|
81 | 81 | > |
|
82 | 82 | > |
|
83 | 83 | > echo ==== qnew -m |
|
84 | 84 | > hg qnew -m "Four" 4.patch |
|
85 | 85 | > echo "4" >4 |
|
86 | 86 | > hg add |
|
87 | 87 | > hg qref |
|
88 | 88 | > catlog 4 |
|
89 | 89 | > |
|
90 | 90 | > echo ==== qref -d |
|
91 | 91 | > hg qref -d '9 0' |
|
92 | 92 | > catlog 4 |
|
93 | 93 | > |
|
94 | 94 | > drop 4 |
|
95 | 95 | > |
|
96 | 96 | > |
|
97 | 97 | > echo ==== qnew with HG header |
|
98 | 98 | > hg qnew --config 'mq.plain=true' 5.patch |
|
99 | 99 | > hg qpop |
|
100 | 100 | > echo "# HG changeset patch" >>.hg/patches/5.patch |
|
101 | 101 | > echo "# Date 10 0" >>.hg/patches/5.patch |
|
102 | 102 | > hg qpush 2>&1 | grep 'Now at' |
|
103 | 103 | > catlogd 5 |
|
104 | 104 | > |
|
105 | 105 | > echo ==== hg qref |
|
106 | 106 | > echo "5" >5 |
|
107 | 107 | > hg add |
|
108 | 108 | > hg qref |
|
109 | 109 | > catlogd 5 |
|
110 | 110 | > |
|
111 | 111 | > echo ==== hg qref -d |
|
112 | 112 | > hg qref -d '11 0' |
|
113 | 113 | > catlogd 5 |
|
114 | 114 | > |
|
115 | 115 | > |
|
116 | 116 | > echo ==== qnew with plain header |
|
117 | 117 | > hg qnew --config 'mq.plain=true' -d '12 0' 6.patch |
|
118 | 118 | > hg qpop |
|
119 | 119 | > hg qpush 2>&1 | grep 'now at' |
|
120 | 120 | > catlog 6 |
|
121 | 121 | > |
|
122 | 122 | > echo ==== hg qref |
|
123 | 123 | > echo "6" >6 |
|
124 | 124 | > hg add |
|
125 | 125 | > hg qref |
|
126 | 126 | > catlogd 6 |
|
127 | 127 | > |
|
128 | 128 | > echo ==== hg qref -d |
|
129 | 129 | > hg qref -d '13 0' |
|
130 | 130 | > catlogd 6 |
|
131 | 131 | > |
|
132 | 132 | > drop 6 |
|
133 | 133 | > |
|
134 | 134 | > |
|
135 | 135 | > echo ==== qnew -u |
|
136 | 136 | > hg qnew -u jane 6.patch |
|
137 | 137 | > echo "6" >6 |
|
138 | 138 | > hg add |
|
139 | 139 | > hg qref |
|
140 | 140 | > catlog 6 |
|
141 | 141 | > |
|
142 | 142 | > echo ==== qref -d |
|
143 | 143 | > hg qref -d '12 0' |
|
144 | 144 | > catlog 6 |
|
145 | 145 | > |
|
146 | 146 | > drop 6 |
|
147 | 147 | > |
|
148 | 148 | > |
|
149 | 149 | > echo ==== qnew -d |
|
150 | 150 | > hg qnew -d '13 0' 7.patch |
|
151 | 151 | > echo "7" >7 |
|
152 | 152 | > hg add |
|
153 | 153 | > hg qref |
|
154 | 154 | > catlog 7 |
|
155 | 155 | > |
|
156 | 156 | > echo ==== qref -u |
|
157 | 157 | > hg qref -u john |
|
158 | 158 | > catlogd 7 |
|
159 | 159 | > |
|
160 | 160 | > |
|
161 | 161 | > echo ==== qnew |
|
162 | 162 | > hg qnew 8.patch |
|
163 | 163 | > echo "8" >8 |
|
164 | 164 | > hg add |
|
165 | 165 | > hg qref |
|
166 | 166 | > catlog 8 |
|
167 | 167 | > |
|
168 | 168 | > echo ==== qref -u -d |
|
169 | 169 | > hg qref -u john -d '14 0' |
|
170 | 170 | > catlog 8 |
|
171 | 171 | > |
|
172 | 172 | > drop 8 |
|
173 | 173 | > |
|
174 | 174 | > |
|
175 | 175 | > echo ==== qnew -m |
|
176 | 176 | > hg qnew -m "Nine" 9.patch |
|
177 | 177 | > echo "9" >9 |
|
178 | 178 | > hg add |
|
179 | 179 | > hg qref |
|
180 | 180 | > catlog 9 |
|
181 | 181 | > |
|
182 | 182 | > echo ==== qref -u -d |
|
183 | 183 | > hg qref -u john -d '15 0' |
|
184 | 184 | > catlog 9 |
|
185 | 185 | > |
|
186 | 186 | > drop 9 |
|
187 | 187 | > |
|
188 | 188 | > |
|
189 | 189 | > echo ==== "qpop -a / qpush -a" |
|
190 | 190 | > hg qpop -a |
|
191 | 191 | > hg qpush -a |
|
192 | > hg log --template "{rev}: {desc} - {author} - {date}\n" | |
|
192 | > hg log --template "{rev}: {node|short} {desc} - {author} - {date}\n" | |
|
193 | 193 | > } |
|
194 | 194 | |
|
195 | 195 | ======= plain headers |
|
196 | 196 | |
|
197 | 197 | $ echo "[mq]" >> $HGRCPATH |
|
198 | 198 | $ echo "plain=true" >> $HGRCPATH |
|
199 | 199 | $ mkdir sandbox |
|
200 | 200 | $ (cd sandbox ; runtest) |
|
201 | 201 | ==== init |
|
202 | 202 | ==== qnew -d |
|
203 | 203 | Date: 3 0 |
|
204 | 204 | |
|
205 | 0: [mq]: 1.patch - test - 3.00 | |
|
205 | 0: 758bd2596a39 [mq]: 1.patch - test - 3.00 | |
|
206 | 206 | ==== qref |
|
207 | 207 | adding 1 |
|
208 | 208 | Date: 3 0 |
|
209 | 209 | |
|
210 | 210 | diff -r ... 1 |
|
211 | 211 | --- /dev/null |
|
212 | 212 | +++ b/1 |
|
213 | 213 | @@ -0,0 +1,1 @@ |
|
214 | 214 | +1 |
|
215 | 0: [mq]: 1.patch - test - 3.00 | |
|
215 | 0: 8c640e9949a8 [mq]: 1.patch - test - 3.00 | |
|
216 | 216 | ==== qref -d |
|
217 | 217 | Date: 4 0 |
|
218 | 218 | |
|
219 | 219 | diff -r ... 1 |
|
220 | 220 | --- /dev/null |
|
221 | 221 | +++ b/1 |
|
222 | 222 | @@ -0,0 +1,1 @@ |
|
223 | 223 | +1 |
|
224 | 0: [mq]: 1.patch - test - 4.00 | |
|
224 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
225 | 225 | ==== qnew |
|
226 | 226 | adding 2 |
|
227 | 227 | diff -r ... 2 |
|
228 | 228 | --- /dev/null |
|
229 | 229 | +++ b/2 |
|
230 | 230 | @@ -0,0 +1,1 @@ |
|
231 | 231 | +2 |
|
232 | 1: [mq]: 2.patch - test | |
|
233 | 0: [mq]: 1.patch - test | |
|
232 | 1: fc7e8a2f6499 [mq]: 2.patch - test | |
|
233 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
234 | 234 | ==== qref -d |
|
235 | 235 | Date: 5 0 |
|
236 | 236 | |
|
237 | 237 | diff -r ... 2 |
|
238 | 238 | --- /dev/null |
|
239 | 239 | +++ b/2 |
|
240 | 240 | @@ -0,0 +1,1 @@ |
|
241 | 241 | +2 |
|
242 | 1: [mq]: 2.patch - test | |
|
243 | 0: [mq]: 1.patch - test | |
|
242 | 1: 1d9a6a118fd1 [mq]: 2.patch - test | |
|
243 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
244 | 244 | popping 2.patch |
|
245 | 245 | now at: 1.patch |
|
246 | 246 | ==== qnew -d -m |
|
247 | 247 | Date: 6 0 |
|
248 | 248 | |
|
249 | 249 | Three |
|
250 | 250 | |
|
251 | 1: Three - test - 6.00 | |
|
252 | 0: [mq]: 1.patch - test - 4.00 | |
|
251 | 1: 2a9ef0bdefba Three - test - 6.00 | |
|
252 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
253 | 253 | ==== qref |
|
254 | 254 | adding 3 |
|
255 | 255 | Date: 6 0 |
|
256 | 256 | |
|
257 | 257 | Three |
|
258 | 258 | |
|
259 | 259 | diff -r ... 3 |
|
260 | 260 | --- /dev/null |
|
261 | 261 | +++ b/3 |
|
262 | 262 | @@ -0,0 +1,1 @@ |
|
263 | 263 | +3 |
|
264 | 1: Three - test - 6.00 | |
|
265 | 0: [mq]: 1.patch - test - 4.00 | |
|
264 | 1: 7f19ad9eea7b Three - test - 6.00 | |
|
265 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
266 | 266 | ==== qref -m |
|
267 | 267 | Date: 6 0 |
|
268 | 268 | |
|
269 | 269 | Drei |
|
270 | 270 | |
|
271 | 271 | diff -r ... 3 |
|
272 | 272 | --- /dev/null |
|
273 | 273 | +++ b/3 |
|
274 | 274 | @@ -0,0 +1,1 @@ |
|
275 | 275 | +3 |
|
276 | 1: Drei - test - 6.00 | |
|
277 | 0: [mq]: 1.patch - test - 4.00 | |
|
276 | 1: 7ff7377793e3 Drei - test - 6.00 | |
|
277 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
278 | 278 | ==== qref -d |
|
279 | 279 | Date: 7 0 |
|
280 | 280 | |
|
281 | 281 | Drei |
|
282 | 282 | |
|
283 | 283 | diff -r ... 3 |
|
284 | 284 | --- /dev/null |
|
285 | 285 | +++ b/3 |
|
286 | 286 | @@ -0,0 +1,1 @@ |
|
287 | 287 | +3 |
|
288 | 1: Drei - test - 7.00 | |
|
289 | 0: [mq]: 1.patch - test - 4.00 | |
|
288 | 1: d89d3144f518 Drei - test - 7.00 | |
|
289 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
290 | 290 | ==== qref -d -m |
|
291 | 291 | Date: 8 0 |
|
292 | 292 | |
|
293 | 293 | Three (again) |
|
294 | 294 | |
|
295 | 295 | diff -r ... 3 |
|
296 | 296 | --- /dev/null |
|
297 | 297 | +++ b/3 |
|
298 | 298 | @@ -0,0 +1,1 @@ |
|
299 | 299 | +3 |
|
300 | 1: Three (again) - test - 8.00 | |
|
301 | 0: [mq]: 1.patch - test - 4.00 | |
|
300 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
301 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
302 | 302 | ==== qnew -m |
|
303 | 303 | adding 4 |
|
304 | 304 | Four |
|
305 | 305 | |
|
306 | 306 | diff -r ... 4 |
|
307 | 307 | --- /dev/null |
|
308 | 308 | +++ b/4 |
|
309 | 309 | @@ -0,0 +1,1 @@ |
|
310 | 310 | +4 |
|
311 | 2: Four - test | |
|
312 | 1: Three (again) - test | |
|
313 | 0: [mq]: 1.patch - test | |
|
311 | 2: 74ded07d166b Four - test | |
|
312 | 1: b1b6b0fe0e6d Three (again) - test | |
|
313 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
314 | 314 | ==== qref -d |
|
315 | 315 | Date: 9 0 |
|
316 | 316 | |
|
317 | 317 | Four |
|
318 | 318 | |
|
319 | 319 | diff -r ... 4 |
|
320 | 320 | --- /dev/null |
|
321 | 321 | +++ b/4 |
|
322 | 322 | @@ -0,0 +1,1 @@ |
|
323 | 323 | +4 |
|
324 | 2: Four - test | |
|
325 | 1: Three (again) - test | |
|
326 | 0: [mq]: 1.patch - test | |
|
324 | 2: 1a651320cf8e Four - test | |
|
325 | 1: b1b6b0fe0e6d Three (again) - test | |
|
326 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
327 | 327 | popping 4.patch |
|
328 | 328 | now at: 3.patch |
|
329 | 329 | ==== qnew with HG header |
|
330 | 330 | popping 5.patch |
|
331 | 331 | now at: 3.patch |
|
332 | 332 | # HG changeset patch |
|
333 | 333 | # Date 10 0 |
|
334 | 2: imported patch 5.patch - test - 10.00 | |
|
335 | 1: Three (again) - test - 8.00 | |
|
336 | 0: [mq]: 1.patch - test - 4.00 | |
|
334 | 2: d16a272220d2 imported patch 5.patch - test - 10.00 | |
|
335 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
336 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
337 | 337 | ==== hg qref |
|
338 | 338 | adding 5 |
|
339 | 339 | # HG changeset patch |
|
340 | 340 | # Date 10 0 |
|
341 | 341 | # Parent |
|
342 | 342 | |
|
343 | 343 | diff -r ... 5 |
|
344 | 344 | --- /dev/null |
|
345 | 345 | +++ b/5 |
|
346 | 346 | @@ -0,0 +1,1 @@ |
|
347 | 347 | +5 |
|
348 | 2: [mq]: 5.patch - test - 10.00 | |
|
349 | 1: Three (again) - test - 8.00 | |
|
350 | 0: [mq]: 1.patch - test - 4.00 | |
|
348 | 2: 5dbf69c07df9 [mq]: 5.patch - test - 10.00 | |
|
349 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
350 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
351 | 351 | ==== hg qref -d |
|
352 | 352 | # HG changeset patch |
|
353 | 353 | # Date 11 0 |
|
354 | 354 | # Parent |
|
355 | 355 | |
|
356 | 356 | diff -r ... 5 |
|
357 | 357 | --- /dev/null |
|
358 | 358 | +++ b/5 |
|
359 | 359 | @@ -0,0 +1,1 @@ |
|
360 | 360 | +5 |
|
361 | 2: [mq]: 5.patch - test - 11.00 | |
|
362 | 1: Three (again) - test - 8.00 | |
|
363 | 0: [mq]: 1.patch - test - 4.00 | |
|
361 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
362 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
363 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
364 | 364 | ==== qnew with plain header |
|
365 | 365 | popping 6.patch |
|
366 | 366 | now at: 5.patch |
|
367 | 367 | now at: 6.patch |
|
368 | 368 | Date: 12 0 |
|
369 | 369 | |
|
370 | 3: imported patch 6.patch - test | |
|
371 | 2: [mq]: 5.patch - test | |
|
372 | 1: Three (again) - test | |
|
373 | 0: [mq]: 1.patch - test | |
|
370 | 3: 8ad9ebc22b96 imported patch 6.patch - test | |
|
371 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
372 | 1: b1b6b0fe0e6d Three (again) - test | |
|
373 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
374 | 374 | ==== hg qref |
|
375 | 375 | adding 6 |
|
376 | 376 | Date: 12 0 |
|
377 | 377 | |
|
378 | 378 | diff -r ... 6 |
|
379 | 379 | --- /dev/null |
|
380 | 380 | +++ b/6 |
|
381 | 381 | @@ -0,0 +1,1 @@ |
|
382 | 382 | +6 |
|
383 | 3: [mq]: 6.patch - test - 12.00 | |
|
384 | 2: [mq]: 5.patch - test - 11.00 | |
|
385 | 1: Three (again) - test - 8.00 | |
|
386 | 0: [mq]: 1.patch - test - 4.00 | |
|
383 | 3: 038c46b02a56 [mq]: 6.patch - test - 12.00 | |
|
384 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
385 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
386 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
387 | 387 | ==== hg qref -d |
|
388 | 388 | Date: 13 0 |
|
389 | 389 | |
|
390 | 390 | diff -r ... 6 |
|
391 | 391 | --- /dev/null |
|
392 | 392 | +++ b/6 |
|
393 | 393 | @@ -0,0 +1,1 @@ |
|
394 | 394 | +6 |
|
395 | 3: [mq]: 6.patch - test - 13.00 | |
|
396 | 2: [mq]: 5.patch - test - 11.00 | |
|
397 | 1: Three (again) - test - 8.00 | |
|
398 | 0: [mq]: 1.patch - test - 4.00 | |
|
395 | 3: 2785642ea4b4 [mq]: 6.patch - test - 13.00 | |
|
396 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
397 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
398 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
399 | 399 | popping 6.patch |
|
400 | 400 | now at: 5.patch |
|
401 | 401 | ==== qnew -u |
|
402 | 402 | adding 6 |
|
403 | 403 | From: jane |
|
404 | 404 | |
|
405 | 405 | diff -r ... 6 |
|
406 | 406 | --- /dev/null |
|
407 | 407 | +++ b/6 |
|
408 | 408 | @@ -0,0 +1,1 @@ |
|
409 | 409 | +6 |
|
410 | 3: [mq]: 6.patch - jane | |
|
411 | 2: [mq]: 5.patch - test | |
|
412 | 1: Three (again) - test | |
|
413 | 0: [mq]: 1.patch - test | |
|
410 | 3: a05a33f187ce [mq]: 6.patch - jane | |
|
411 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
412 | 1: b1b6b0fe0e6d Three (again) - test | |
|
413 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
414 | 414 | ==== qref -d |
|
415 | 415 | From: jane |
|
416 | 416 | Date: 12 0 |
|
417 | 417 | |
|
418 | 418 | diff -r ... 6 |
|
419 | 419 | --- /dev/null |
|
420 | 420 | +++ b/6 |
|
421 | 421 | @@ -0,0 +1,1 @@ |
|
422 | 422 | +6 |
|
423 | 3: [mq]: 6.patch - jane | |
|
424 | 2: [mq]: 5.patch - test | |
|
425 | 1: Three (again) - test | |
|
426 | 0: [mq]: 1.patch - test | |
|
423 | 3: 5702c529dfe9 [mq]: 6.patch - jane | |
|
424 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
425 | 1: b1b6b0fe0e6d Three (again) - test | |
|
426 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
427 | 427 | popping 6.patch |
|
428 | 428 | now at: 5.patch |
|
429 | 429 | ==== qnew -d |
|
430 | 430 | adding 7 |
|
431 | 431 | Date: 13 0 |
|
432 | 432 | |
|
433 | 433 | diff -r ... 7 |
|
434 | 434 | --- /dev/null |
|
435 | 435 | +++ b/7 |
|
436 | 436 | @@ -0,0 +1,1 @@ |
|
437 | 437 | +7 |
|
438 | 3: [mq]: 7.patch - test | |
|
439 | 2: [mq]: 5.patch - test | |
|
440 | 1: Three (again) - test | |
|
441 | 0: [mq]: 1.patch - test | |
|
438 | 3: 8dd1eb8d4132 [mq]: 7.patch - test | |
|
439 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
440 | 1: b1b6b0fe0e6d Three (again) - test | |
|
441 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
442 | 442 | ==== qref -u |
|
443 | 443 | From: john |
|
444 | 444 | Date: 13 0 |
|
445 | 445 | |
|
446 | 446 | diff -r ... 7 |
|
447 | 447 | --- /dev/null |
|
448 | 448 | +++ b/7 |
|
449 | 449 | @@ -0,0 +1,1 @@ |
|
450 | 450 | +7 |
|
451 | 3: [mq]: 7.patch - john - 13.00 | |
|
452 | 2: [mq]: 5.patch - test - 11.00 | |
|
453 | 1: Three (again) - test - 8.00 | |
|
454 | 0: [mq]: 1.patch - test - 4.00 | |
|
451 | 3: 4f9d07369cc4 [mq]: 7.patch - john - 13.00 | |
|
452 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
453 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
454 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
455 | 455 | ==== qnew |
|
456 | 456 | adding 8 |
|
457 | 457 | diff -r ... 8 |
|
458 | 458 | --- /dev/null |
|
459 | 459 | +++ b/8 |
|
460 | 460 | @@ -0,0 +1,1 @@ |
|
461 | 461 | +8 |
|
462 | 4: [mq]: 8.patch - test | |
|
463 | 3: [mq]: 7.patch - john | |
|
464 | 2: [mq]: 5.patch - test | |
|
465 | 1: Three (again) - test | |
|
466 | 0: [mq]: 1.patch - test | |
|
462 | 4: 868b62f09492 [mq]: 8.patch - test | |
|
463 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
464 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
465 | 1: b1b6b0fe0e6d Three (again) - test | |
|
466 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
467 | 467 | ==== qref -u -d |
|
468 | 468 | From: john |
|
469 | 469 | Date: 14 0 |
|
470 | 470 | |
|
471 | 471 | diff -r ... 8 |
|
472 | 472 | --- /dev/null |
|
473 | 473 | +++ b/8 |
|
474 | 474 | @@ -0,0 +1,1 @@ |
|
475 | 475 | +8 |
|
476 | 4: [mq]: 8.patch - john | |
|
477 | 3: [mq]: 7.patch - john | |
|
478 | 2: [mq]: 5.patch - test | |
|
479 | 1: Three (again) - test | |
|
480 | 0: [mq]: 1.patch - test | |
|
476 | 4: b1e878ae55b9 [mq]: 8.patch - john | |
|
477 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
478 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
479 | 1: b1b6b0fe0e6d Three (again) - test | |
|
480 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
481 | 481 | popping 8.patch |
|
482 | 482 | now at: 7.patch |
|
483 | 483 | ==== qnew -m |
|
484 | 484 | adding 9 |
|
485 | 485 | Nine |
|
486 | 486 | |
|
487 | 487 | diff -r ... 9 |
|
488 | 488 | --- /dev/null |
|
489 | 489 | +++ b/9 |
|
490 | 490 | @@ -0,0 +1,1 @@ |
|
491 | 491 | +9 |
|
492 | 4: Nine - test | |
|
493 | 3: [mq]: 7.patch - john | |
|
494 | 2: [mq]: 5.patch - test | |
|
495 | 1: Three (again) - test | |
|
496 | 0: [mq]: 1.patch - test | |
|
492 | 4: 7251936ac2bf Nine - test | |
|
493 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
494 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
495 | 1: b1b6b0fe0e6d Three (again) - test | |
|
496 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
497 | 497 | ==== qref -u -d |
|
498 | 498 | From: john |
|
499 | 499 | Date: 15 0 |
|
500 | 500 | |
|
501 | 501 | Nine |
|
502 | 502 | |
|
503 | 503 | diff -r ... 9 |
|
504 | 504 | --- /dev/null |
|
505 | 505 | +++ b/9 |
|
506 | 506 | @@ -0,0 +1,1 @@ |
|
507 | 507 | +9 |
|
508 | 4: Nine - john | |
|
509 | 3: [mq]: 7.patch - john | |
|
510 | 2: [mq]: 5.patch - test | |
|
511 | 1: Three (again) - test | |
|
512 | 0: [mq]: 1.patch - test | |
|
508 | 4: a0de5bf6e9f7 Nine - john | |
|
509 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
510 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
511 | 1: b1b6b0fe0e6d Three (again) - test | |
|
512 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
513 | 513 | popping 9.patch |
|
514 | 514 | now at: 7.patch |
|
515 | 515 | ==== qpop -a / qpush -a |
|
516 | 516 | popping 7.patch |
|
517 | 517 | popping 5.patch |
|
518 | 518 | popping 3.patch |
|
519 | 519 | popping 1.patch |
|
520 | 520 | patch queue now empty |
|
521 | 521 | applying 1.patch |
|
522 | 522 | applying 3.patch |
|
523 | 523 | applying 5.patch |
|
524 | 524 | applying 7.patch |
|
525 | 525 | now at: 7.patch |
|
526 | 3: imported patch 7.patch - john - 13.00 | |
|
527 | 2: imported patch 5.patch - test - 11.00 | |
|
528 | 1: Three (again) - test - 8.00 | |
|
529 | 0: imported patch 1.patch - test - 4.00 | |
|
526 | 3: d26a5b7ffce1 imported patch 7.patch - john - 13.00 | |
|
527 | 2: dda6cf77060a imported patch 5.patch - test - 11.00 | |
|
528 | 1: 25e32d66c8c7 Three (again) - test - 8.00 | |
|
529 | 0: e5011c0211fe imported patch 1.patch - test - 4.00 | |
|
530 | 530 | $ rm -r sandbox |
|
531 | 531 | |
|
532 | 532 | ======= hg headers |
|
533 | 533 | |
|
534 | 534 | $ echo "plain=false" >> $HGRCPATH |
|
535 | 535 | $ mkdir sandbox |
|
536 | 536 | $ (cd sandbox ; runtest) |
|
537 | 537 | ==== init |
|
538 | 538 | ==== qnew -d |
|
539 | 539 | # HG changeset patch |
|
540 | 540 | # Date 3 0 |
|
541 | 541 | # Parent |
|
542 | 542 | |
|
543 | 0: [mq]: 1.patch - test - 3.00 | |
|
543 | 0: 758bd2596a39 [mq]: 1.patch - test - 3.00 | |
|
544 | 544 | ==== qref |
|
545 | 545 | adding 1 |
|
546 | 546 | # HG changeset patch |
|
547 | 547 | # Date 3 0 |
|
548 | 548 | # Parent |
|
549 | 549 | |
|
550 | 550 | diff -r ... 1 |
|
551 | 551 | --- /dev/null |
|
552 | 552 | +++ b/1 |
|
553 | 553 | @@ -0,0 +1,1 @@ |
|
554 | 554 | +1 |
|
555 | 0: [mq]: 1.patch - test - 3.00 | |
|
555 | 0: 8c640e9949a8 [mq]: 1.patch - test - 3.00 | |
|
556 | 556 | ==== qref -d |
|
557 | 557 | # HG changeset patch |
|
558 | 558 | # Date 4 0 |
|
559 | 559 | # Parent |
|
560 | 560 | |
|
561 | 561 | diff -r ... 1 |
|
562 | 562 | --- /dev/null |
|
563 | 563 | +++ b/1 |
|
564 | 564 | @@ -0,0 +1,1 @@ |
|
565 | 565 | +1 |
|
566 | 0: [mq]: 1.patch - test - 4.00 | |
|
566 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
567 | 567 | ==== qnew |
|
568 | 568 | adding 2 |
|
569 | 569 | # HG changeset patch |
|
570 | 570 | # Parent |
|
571 | 571 | |
|
572 | 572 | diff -r ... 2 |
|
573 | 573 | --- /dev/null |
|
574 | 574 | +++ b/2 |
|
575 | 575 | @@ -0,0 +1,1 @@ |
|
576 | 576 | +2 |
|
577 | 1: [mq]: 2.patch - test | |
|
578 | 0: [mq]: 1.patch - test | |
|
577 | 1: fc7e8a2f6499 [mq]: 2.patch - test | |
|
578 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
579 | 579 | ==== qref -d |
|
580 | 580 | # HG changeset patch |
|
581 | 581 | # Date 5 0 |
|
582 | 582 | # Parent |
|
583 | 583 | |
|
584 | 584 | diff -r ... 2 |
|
585 | 585 | --- /dev/null |
|
586 | 586 | +++ b/2 |
|
587 | 587 | @@ -0,0 +1,1 @@ |
|
588 | 588 | +2 |
|
589 | 1: [mq]: 2.patch - test | |
|
590 | 0: [mq]: 1.patch - test | |
|
589 | 1: 1d9a6a118fd1 [mq]: 2.patch - test | |
|
590 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
591 | 591 | popping 2.patch |
|
592 | 592 | now at: 1.patch |
|
593 | 593 | ==== qnew -d -m |
|
594 | 594 | # HG changeset patch |
|
595 | 595 | # Date 6 0 |
|
596 | 596 | # Parent |
|
597 | 597 | Three |
|
598 | 598 | |
|
599 | 1: Three - test - 6.00 | |
|
600 | 0: [mq]: 1.patch - test - 4.00 | |
|
599 | 1: 2a9ef0bdefba Three - test - 6.00 | |
|
600 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
601 | 601 | ==== qref |
|
602 | 602 | adding 3 |
|
603 | 603 | # HG changeset patch |
|
604 | 604 | # Date 6 0 |
|
605 | 605 | # Parent |
|
606 | 606 | Three |
|
607 | 607 | |
|
608 | 608 | diff -r ... 3 |
|
609 | 609 | --- /dev/null |
|
610 | 610 | +++ b/3 |
|
611 | 611 | @@ -0,0 +1,1 @@ |
|
612 | 612 | +3 |
|
613 | 1: Three - test - 6.00 | |
|
614 | 0: [mq]: 1.patch - test - 4.00 | |
|
613 | 1: 7f19ad9eea7b Three - test - 6.00 | |
|
614 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
615 | 615 | ==== qref -m |
|
616 | 616 | # HG changeset patch |
|
617 | 617 | # Date 6 0 |
|
618 | 618 | # Parent |
|
619 | 619 | Drei |
|
620 | 620 | |
|
621 | 621 | diff -r ... 3 |
|
622 | 622 | --- /dev/null |
|
623 | 623 | +++ b/3 |
|
624 | 624 | @@ -0,0 +1,1 @@ |
|
625 | 625 | +3 |
|
626 | 1: Drei - test - 6.00 | |
|
627 | 0: [mq]: 1.patch - test - 4.00 | |
|
626 | 1: 7ff7377793e3 Drei - test - 6.00 | |
|
627 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
628 | 628 | ==== qref -d |
|
629 | 629 | # HG changeset patch |
|
630 | 630 | # Date 7 0 |
|
631 | 631 | # Parent |
|
632 | 632 | Drei |
|
633 | 633 | |
|
634 | 634 | diff -r ... 3 |
|
635 | 635 | --- /dev/null |
|
636 | 636 | +++ b/3 |
|
637 | 637 | @@ -0,0 +1,1 @@ |
|
638 | 638 | +3 |
|
639 | 1: Drei - test - 7.00 | |
|
640 | 0: [mq]: 1.patch - test - 4.00 | |
|
639 | 1: d89d3144f518 Drei - test - 7.00 | |
|
640 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
641 | 641 | ==== qref -d -m |
|
642 | 642 | # HG changeset patch |
|
643 | 643 | # Date 8 0 |
|
644 | 644 | # Parent |
|
645 | 645 | Three (again) |
|
646 | 646 | |
|
647 | 647 | diff -r ... 3 |
|
648 | 648 | --- /dev/null |
|
649 | 649 | +++ b/3 |
|
650 | 650 | @@ -0,0 +1,1 @@ |
|
651 | 651 | +3 |
|
652 | 1: Three (again) - test - 8.00 | |
|
653 | 0: [mq]: 1.patch - test - 4.00 | |
|
652 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
653 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
654 | 654 | ==== qnew -m |
|
655 | 655 | adding 4 |
|
656 | 656 | # HG changeset patch |
|
657 | 657 | # Parent |
|
658 | 658 | Four |
|
659 | 659 | |
|
660 | 660 | diff -r ... 4 |
|
661 | 661 | --- /dev/null |
|
662 | 662 | +++ b/4 |
|
663 | 663 | @@ -0,0 +1,1 @@ |
|
664 | 664 | +4 |
|
665 | 2: Four - test | |
|
666 | 1: Three (again) - test | |
|
667 | 0: [mq]: 1.patch - test | |
|
665 | 2: 74ded07d166b Four - test | |
|
666 | 1: b1b6b0fe0e6d Three (again) - test | |
|
667 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
668 | 668 | ==== qref -d |
|
669 | 669 | # HG changeset patch |
|
670 | 670 | # Date 9 0 |
|
671 | 671 | # Parent |
|
672 | 672 | Four |
|
673 | 673 | |
|
674 | 674 | diff -r ... 4 |
|
675 | 675 | --- /dev/null |
|
676 | 676 | +++ b/4 |
|
677 | 677 | @@ -0,0 +1,1 @@ |
|
678 | 678 | +4 |
|
679 | 2: Four - test | |
|
680 | 1: Three (again) - test | |
|
681 | 0: [mq]: 1.patch - test | |
|
679 | 2: 1a651320cf8e Four - test | |
|
680 | 1: b1b6b0fe0e6d Three (again) - test | |
|
681 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
682 | 682 | popping 4.patch |
|
683 | 683 | now at: 3.patch |
|
684 | 684 | ==== qnew with HG header |
|
685 | 685 | popping 5.patch |
|
686 | 686 | now at: 3.patch |
|
687 | 687 | # HG changeset patch |
|
688 | 688 | # Date 10 0 |
|
689 | 2: imported patch 5.patch - test - 10.00 | |
|
690 | 1: Three (again) - test - 8.00 | |
|
691 | 0: [mq]: 1.patch - test - 4.00 | |
|
689 | 2: d16a272220d2 imported patch 5.patch - test - 10.00 | |
|
690 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
691 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
692 | 692 | ==== hg qref |
|
693 | 693 | adding 5 |
|
694 | 694 | # HG changeset patch |
|
695 | 695 | # Date 10 0 |
|
696 | 696 | # Parent |
|
697 | 697 | |
|
698 | 698 | diff -r ... 5 |
|
699 | 699 | --- /dev/null |
|
700 | 700 | +++ b/5 |
|
701 | 701 | @@ -0,0 +1,1 @@ |
|
702 | 702 | +5 |
|
703 | 2: [mq]: 5.patch - test - 10.00 | |
|
704 | 1: Three (again) - test - 8.00 | |
|
705 | 0: [mq]: 1.patch - test - 4.00 | |
|
703 | 2: 5dbf69c07df9 [mq]: 5.patch - test - 10.00 | |
|
704 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
705 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
706 | 706 | ==== hg qref -d |
|
707 | 707 | # HG changeset patch |
|
708 | 708 | # Date 11 0 |
|
709 | 709 | # Parent |
|
710 | 710 | |
|
711 | 711 | diff -r ... 5 |
|
712 | 712 | --- /dev/null |
|
713 | 713 | +++ b/5 |
|
714 | 714 | @@ -0,0 +1,1 @@ |
|
715 | 715 | +5 |
|
716 | 2: [mq]: 5.patch - test - 11.00 | |
|
717 | 1: Three (again) - test - 8.00 | |
|
718 | 0: [mq]: 1.patch - test - 4.00 | |
|
716 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
717 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
718 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
719 | 719 | ==== qnew with plain header |
|
720 | 720 | popping 6.patch |
|
721 | 721 | now at: 5.patch |
|
722 | 722 | now at: 6.patch |
|
723 | 723 | Date: 12 0 |
|
724 | 724 | |
|
725 | 3: imported patch 6.patch - test | |
|
726 | 2: [mq]: 5.patch - test | |
|
727 | 1: Three (again) - test | |
|
728 | 0: [mq]: 1.patch - test | |
|
725 | 3: 8ad9ebc22b96 imported patch 6.patch - test | |
|
726 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
727 | 1: b1b6b0fe0e6d Three (again) - test | |
|
728 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
729 | 729 | ==== hg qref |
|
730 | 730 | adding 6 |
|
731 | 731 | Date: 12 0 |
|
732 | 732 | |
|
733 | 733 | diff -r ... 6 |
|
734 | 734 | --- /dev/null |
|
735 | 735 | +++ b/6 |
|
736 | 736 | @@ -0,0 +1,1 @@ |
|
737 | 737 | +6 |
|
738 | 3: [mq]: 6.patch - test - 12.00 | |
|
739 | 2: [mq]: 5.patch - test - 11.00 | |
|
740 | 1: Three (again) - test - 8.00 | |
|
741 | 0: [mq]: 1.patch - test - 4.00 | |
|
738 | 3: 038c46b02a56 [mq]: 6.patch - test - 12.00 | |
|
739 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
740 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
741 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
742 | 742 | ==== hg qref -d |
|
743 | 743 | Date: 13 0 |
|
744 | 744 | |
|
745 | 745 | diff -r ... 6 |
|
746 | 746 | --- /dev/null |
|
747 | 747 | +++ b/6 |
|
748 | 748 | @@ -0,0 +1,1 @@ |
|
749 | 749 | +6 |
|
750 | 3: [mq]: 6.patch - test - 13.00 | |
|
751 | 2: [mq]: 5.patch - test - 11.00 | |
|
752 | 1: Three (again) - test - 8.00 | |
|
753 | 0: [mq]: 1.patch - test - 4.00 | |
|
750 | 3: 2785642ea4b4 [mq]: 6.patch - test - 13.00 | |
|
751 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
752 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
753 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
754 | 754 | popping 6.patch |
|
755 | 755 | now at: 5.patch |
|
756 | 756 | ==== qnew -u |
|
757 | 757 | adding 6 |
|
758 | 758 | # HG changeset patch |
|
759 | 759 | # User jane |
|
760 | 760 | # Parent |
|
761 | 761 | |
|
762 | 762 | diff -r ... 6 |
|
763 | 763 | --- /dev/null |
|
764 | 764 | +++ b/6 |
|
765 | 765 | @@ -0,0 +1,1 @@ |
|
766 | 766 | +6 |
|
767 | 3: [mq]: 6.patch - jane | |
|
768 | 2: [mq]: 5.patch - test | |
|
769 | 1: Three (again) - test | |
|
770 | 0: [mq]: 1.patch - test | |
|
767 | 3: a05a33f187ce [mq]: 6.patch - jane | |
|
768 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
769 | 1: b1b6b0fe0e6d Three (again) - test | |
|
770 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
771 | 771 | ==== qref -d |
|
772 | 772 | # HG changeset patch |
|
773 | 773 | # User jane |
|
774 | 774 | # Date 12 0 |
|
775 | 775 | # Parent |
|
776 | 776 | |
|
777 | 777 | diff -r ... 6 |
|
778 | 778 | --- /dev/null |
|
779 | 779 | +++ b/6 |
|
780 | 780 | @@ -0,0 +1,1 @@ |
|
781 | 781 | +6 |
|
782 | 3: [mq]: 6.patch - jane | |
|
783 | 2: [mq]: 5.patch - test | |
|
784 | 1: Three (again) - test | |
|
785 | 0: [mq]: 1.patch - test | |
|
782 | 3: 5702c529dfe9 [mq]: 6.patch - jane | |
|
783 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
784 | 1: b1b6b0fe0e6d Three (again) - test | |
|
785 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
786 | 786 | popping 6.patch |
|
787 | 787 | now at: 5.patch |
|
788 | 788 | ==== qnew -d |
|
789 | 789 | adding 7 |
|
790 | 790 | # HG changeset patch |
|
791 | 791 | # Date 13 0 |
|
792 | 792 | # Parent |
|
793 | 793 | |
|
794 | 794 | diff -r ... 7 |
|
795 | 795 | --- /dev/null |
|
796 | 796 | +++ b/7 |
|
797 | 797 | @@ -0,0 +1,1 @@ |
|
798 | 798 | +7 |
|
799 | 3: [mq]: 7.patch - test | |
|
800 | 2: [mq]: 5.patch - test | |
|
801 | 1: Three (again) - test | |
|
802 | 0: [mq]: 1.patch - test | |
|
799 | 3: 8dd1eb8d4132 [mq]: 7.patch - test | |
|
800 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
801 | 1: b1b6b0fe0e6d Three (again) - test | |
|
802 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
803 | 803 | ==== qref -u |
|
804 | 804 | # HG changeset patch |
|
805 | 805 | # User john |
|
806 | 806 | # Date 13 0 |
|
807 | 807 | # Parent |
|
808 | 808 | |
|
809 | 809 | diff -r ... 7 |
|
810 | 810 | --- /dev/null |
|
811 | 811 | +++ b/7 |
|
812 | 812 | @@ -0,0 +1,1 @@ |
|
813 | 813 | +7 |
|
814 | 3: [mq]: 7.patch - john - 13.00 | |
|
815 | 2: [mq]: 5.patch - test - 11.00 | |
|
816 | 1: Three (again) - test - 8.00 | |
|
817 | 0: [mq]: 1.patch - test - 4.00 | |
|
814 | 3: 4f9d07369cc4 [mq]: 7.patch - john - 13.00 | |
|
815 | 2: 049de6af0c1d [mq]: 5.patch - test - 11.00 | |
|
816 | 1: b1b6b0fe0e6d Three (again) - test - 8.00 | |
|
817 | 0: 4a67dfeea974 [mq]: 1.patch - test - 4.00 | |
|
818 | 818 | ==== qnew |
|
819 | 819 | adding 8 |
|
820 | 820 | # HG changeset patch |
|
821 | 821 | # Parent |
|
822 | 822 | |
|
823 | 823 | diff -r ... 8 |
|
824 | 824 | --- /dev/null |
|
825 | 825 | +++ b/8 |
|
826 | 826 | @@ -0,0 +1,1 @@ |
|
827 | 827 | +8 |
|
828 | 4: [mq]: 8.patch - test | |
|
829 | 3: [mq]: 7.patch - john | |
|
830 | 2: [mq]: 5.patch - test | |
|
831 | 1: Three (again) - test | |
|
832 | 0: [mq]: 1.patch - test | |
|
828 | 4: 868b62f09492 [mq]: 8.patch - test | |
|
829 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
830 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
831 | 1: b1b6b0fe0e6d Three (again) - test | |
|
832 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
833 | 833 | ==== qref -u -d |
|
834 | 834 | # HG changeset patch |
|
835 | 835 | # User john |
|
836 | 836 | # Date 14 0 |
|
837 | 837 | # Parent |
|
838 | 838 | |
|
839 | 839 | diff -r ... 8 |
|
840 | 840 | --- /dev/null |
|
841 | 841 | +++ b/8 |
|
842 | 842 | @@ -0,0 +1,1 @@ |
|
843 | 843 | +8 |
|
844 | 4: [mq]: 8.patch - john | |
|
845 | 3: [mq]: 7.patch - john | |
|
846 | 2: [mq]: 5.patch - test | |
|
847 | 1: Three (again) - test | |
|
848 | 0: [mq]: 1.patch - test | |
|
844 | 4: b1e878ae55b9 [mq]: 8.patch - john | |
|
845 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
846 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
847 | 1: b1b6b0fe0e6d Three (again) - test | |
|
848 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
849 | 849 | popping 8.patch |
|
850 | 850 | now at: 7.patch |
|
851 | 851 | ==== qnew -m |
|
852 | 852 | adding 9 |
|
853 | 853 | # HG changeset patch |
|
854 | 854 | # Parent |
|
855 | 855 | Nine |
|
856 | 856 | |
|
857 | 857 | diff -r ... 9 |
|
858 | 858 | --- /dev/null |
|
859 | 859 | +++ b/9 |
|
860 | 860 | @@ -0,0 +1,1 @@ |
|
861 | 861 | +9 |
|
862 | 4: Nine - test | |
|
863 | 3: [mq]: 7.patch - john | |
|
864 | 2: [mq]: 5.patch - test | |
|
865 | 1: Three (again) - test | |
|
866 | 0: [mq]: 1.patch - test | |
|
862 | 4: 7251936ac2bf Nine - test | |
|
863 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
864 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
865 | 1: b1b6b0fe0e6d Three (again) - test | |
|
866 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
867 | 867 | ==== qref -u -d |
|
868 | 868 | # HG changeset patch |
|
869 | 869 | # User john |
|
870 | 870 | # Date 15 0 |
|
871 | 871 | # Parent |
|
872 | 872 | Nine |
|
873 | 873 | |
|
874 | 874 | diff -r ... 9 |
|
875 | 875 | --- /dev/null |
|
876 | 876 | +++ b/9 |
|
877 | 877 | @@ -0,0 +1,1 @@ |
|
878 | 878 | +9 |
|
879 | 4: Nine - john | |
|
880 | 3: [mq]: 7.patch - john | |
|
881 | 2: [mq]: 5.patch - test | |
|
882 | 1: Three (again) - test | |
|
883 | 0: [mq]: 1.patch - test | |
|
879 | 4: a0de5bf6e9f7 Nine - john | |
|
880 | 3: 4f9d07369cc4 [mq]: 7.patch - john | |
|
881 | 2: 049de6af0c1d [mq]: 5.patch - test | |
|
882 | 1: b1b6b0fe0e6d Three (again) - test | |
|
883 | 0: 4a67dfeea974 [mq]: 1.patch - test | |
|
884 | 884 | popping 9.patch |
|
885 | 885 | now at: 7.patch |
|
886 | 886 | ==== qpop -a / qpush -a |
|
887 | 887 | popping 7.patch |
|
888 | 888 | popping 5.patch |
|
889 | 889 | popping 3.patch |
|
890 | 890 | popping 1.patch |
|
891 | 891 | patch queue now empty |
|
892 | 892 | applying 1.patch |
|
893 | 893 | applying 3.patch |
|
894 | 894 | applying 5.patch |
|
895 | 895 | applying 7.patch |
|
896 | 896 | now at: 7.patch |
|
897 | 3: imported patch 7.patch - john - 13.00 | |
|
898 | 2: imported patch 5.patch - test - 11.00 | |
|
899 | 1: Three (again) - test - 8.00 | |
|
900 | 0: imported patch 1.patch - test - 4.00 | |
|
897 | 3: d26a5b7ffce1 imported patch 7.patch - john - 13.00 | |
|
898 | 2: dda6cf77060a imported patch 5.patch - test - 11.00 | |
|
899 | 1: 25e32d66c8c7 Three (again) - test - 8.00 | |
|
900 | 0: e5011c0211fe imported patch 1.patch - test - 4.00 | |
|
901 | 901 | $ rm -r sandbox |
@@ -1,974 +1,974 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | 3 | $ echo "mq=" >> $HGRCPATH |
|
4 | 4 | $ echo "[diff]" >> $HGRCPATH |
|
5 | 5 | $ echo "nodates=true" >> $HGRCPATH |
|
6 | 6 | $ catlog() { |
|
7 | 7 | > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ |
|
8 | 8 | > -e "s/^\(# Parent \).*/\1/" |
|
9 | > hg log --template "{rev}: {desc} - {author}\n" | |
|
9 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
|
10 | 10 | > } |
|
11 | 11 | $ runtest() { |
|
12 | 12 | > echo ==== init |
|
13 | 13 | > hg init a |
|
14 | 14 | > cd a |
|
15 | 15 | > hg qinit |
|
16 | 16 | > |
|
17 | 17 | > |
|
18 | 18 | > echo ==== qnew -U |
|
19 | 19 | > hg qnew -U 1.patch |
|
20 | 20 | > catlog 1 |
|
21 | 21 | > |
|
22 | 22 | > echo ==== qref |
|
23 | 23 | > echo "1" >1 |
|
24 | 24 | > hg add |
|
25 | 25 | > hg qref |
|
26 | 26 | > catlog 1 |
|
27 | 27 | > |
|
28 | 28 | > echo ==== qref -u |
|
29 | 29 | > hg qref -u mary |
|
30 | 30 | > catlog 1 |
|
31 | 31 | > |
|
32 | 32 | > echo ==== qnew |
|
33 | 33 | > hg qnew 2.patch |
|
34 | 34 | > echo "2" >2 |
|
35 | 35 | > hg add |
|
36 | 36 | > hg qref |
|
37 | 37 | > catlog 2 |
|
38 | 38 | > |
|
39 | 39 | > echo ==== qref -u |
|
40 | 40 | > hg qref -u jane |
|
41 | 41 | > catlog 2 |
|
42 | 42 | > |
|
43 | 43 | > |
|
44 | 44 | > echo ==== qnew -U -m |
|
45 | 45 | > hg qnew -U -m "Three" 3.patch |
|
46 | 46 | > catlog 3 |
|
47 | 47 | > |
|
48 | 48 | > echo ==== qref |
|
49 | 49 | > echo "3" >3 |
|
50 | 50 | > hg add |
|
51 | 51 | > hg qref |
|
52 | 52 | > catlog 3 |
|
53 | 53 | > |
|
54 | 54 | > echo ==== qref -m |
|
55 | 55 | > hg qref -m "Drei" |
|
56 | 56 | > catlog 3 |
|
57 | 57 | > |
|
58 | 58 | > echo ==== qref -u |
|
59 | 59 | > hg qref -u mary |
|
60 | 60 | > catlog 3 |
|
61 | 61 | > |
|
62 | 62 | > echo ==== qref -u -m |
|
63 | 63 | > hg qref -u maria -m "Three (again)" |
|
64 | 64 | > catlog 3 |
|
65 | 65 | > |
|
66 | 66 | > echo ==== qnew -m |
|
67 | 67 | > hg qnew -m "Four" 4.patch |
|
68 | 68 | > echo "4" >4of t |
|
69 | 69 | > hg add |
|
70 | 70 | > hg qref |
|
71 | 71 | > catlog 4 |
|
72 | 72 | > |
|
73 | 73 | > echo ==== qref -u |
|
74 | 74 | > hg qref -u jane |
|
75 | 75 | > catlog 4 |
|
76 | 76 | > |
|
77 | 77 | > |
|
78 | 78 | > echo ==== qnew with HG header |
|
79 | 79 | > hg qnew --config 'mq.plain=true' 5.patch |
|
80 | 80 | > hg qpop |
|
81 | 81 | > echo "# HG changeset patch" >>.hg/patches/5.patch |
|
82 | 82 | > echo "# User johndoe" >>.hg/patches/5.patch |
|
83 | 83 | > hg qpush 2>&1 | grep 'now at' |
|
84 | 84 | > catlog 5 |
|
85 | 85 | > |
|
86 | 86 | > echo ==== hg qref |
|
87 | 87 | > echo "5" >5 |
|
88 | 88 | > hg add |
|
89 | 89 | > hg qref |
|
90 | 90 | > catlog 5 |
|
91 | 91 | > |
|
92 | 92 | > echo ==== hg qref -U |
|
93 | 93 | > hg qref -U |
|
94 | 94 | > catlog 5 |
|
95 | 95 | > |
|
96 | 96 | > echo ==== hg qref -u |
|
97 | 97 | > hg qref -u johndeere |
|
98 | 98 | > catlog 5 |
|
99 | 99 | > |
|
100 | 100 | > |
|
101 | 101 | > echo ==== qnew with plain header |
|
102 | 102 | > hg qnew --config 'mq.plain=true' -U 6.patch |
|
103 | 103 | > hg qpop |
|
104 | 104 | > hg qpush 2>&1 | grep 'now at' |
|
105 | 105 | > catlog 6 |
|
106 | 106 | > |
|
107 | 107 | > echo ==== hg qref |
|
108 | 108 | > echo "6" >6 |
|
109 | 109 | > hg add |
|
110 | 110 | > hg qref |
|
111 | 111 | > catlog 6 |
|
112 | 112 | > |
|
113 | 113 | > echo ==== hg qref -U |
|
114 | 114 | > hg qref -U |
|
115 | 115 | > catlog 6 |
|
116 | 116 | > |
|
117 | 117 | > echo ==== hg qref -u |
|
118 | 118 | > hg qref -u johndeere |
|
119 | 119 | > catlog 6 |
|
120 | 120 | > |
|
121 | 121 | > |
|
122 | 122 | > echo ==== "qpop -a / qpush -a" |
|
123 | 123 | > hg qpop -a |
|
124 | 124 | > hg qpush -a |
|
125 | > hg log --template "{rev}: {desc} - {author}\n" | |
|
125 | > hg log --template "{rev}: {node|short} {desc} - {author}\n" | |
|
126 | 126 | > } |
|
127 | 127 | |
|
128 | 128 | ======= plain headers |
|
129 | 129 | |
|
130 | 130 | $ echo "[mq]" >> $HGRCPATH |
|
131 | 131 | $ echo "plain=true" >> $HGRCPATH |
|
132 | 132 | $ mkdir sandbox |
|
133 | 133 | $ (cd sandbox ; runtest) |
|
134 | 134 | ==== init |
|
135 | 135 | ==== qnew -U |
|
136 | 136 | From: test |
|
137 | 137 | |
|
138 | 0: [mq]: 1.patch - test | |
|
138 | 0: a054644889e5 [mq]: 1.patch - test | |
|
139 | 139 | ==== qref |
|
140 | 140 | adding 1 |
|
141 | 141 | From: test |
|
142 | 142 | |
|
143 | 143 | diff -r ... 1 |
|
144 | 144 | --- /dev/null |
|
145 | 145 | +++ b/1 |
|
146 | 146 | @@ -0,0 +1,1 @@ |
|
147 | 147 | +1 |
|
148 | 0: [mq]: 1.patch - test | |
|
148 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
|
149 | 149 | ==== qref -u |
|
150 | 150 | From: mary |
|
151 | 151 | |
|
152 | 152 | diff -r ... 1 |
|
153 | 153 | --- /dev/null |
|
154 | 154 | +++ b/1 |
|
155 | 155 | @@ -0,0 +1,1 @@ |
|
156 | 156 | +1 |
|
157 | 0: [mq]: 1.patch - mary | |
|
157 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
158 | 158 | ==== qnew |
|
159 | 159 | adding 2 |
|
160 | 160 | diff -r ... 2 |
|
161 | 161 | --- /dev/null |
|
162 | 162 | +++ b/2 |
|
163 | 163 | @@ -0,0 +1,1 @@ |
|
164 | 164 | +2 |
|
165 | 1: [mq]: 2.patch - test | |
|
166 | 0: [mq]: 1.patch - mary | |
|
165 | 1: 527f98a12a7a [mq]: 2.patch - test | |
|
166 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
167 | 167 | ==== qref -u |
|
168 | 168 | From: jane |
|
169 | 169 | |
|
170 | 170 | diff -r ... 2 |
|
171 | 171 | --- /dev/null |
|
172 | 172 | +++ b/2 |
|
173 | 173 | @@ -0,0 +1,1 @@ |
|
174 | 174 | +2 |
|
175 | 1: [mq]: 2.patch - jane | |
|
176 | 0: [mq]: 1.patch - mary | |
|
175 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
176 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
177 | 177 | ==== qnew -U -m |
|
178 | 178 | From: test |
|
179 | 179 | |
|
180 | 180 | Three |
|
181 | 181 | |
|
182 | 2: Three - test | |
|
183 | 1: [mq]: 2.patch - jane | |
|
184 | 0: [mq]: 1.patch - mary | |
|
182 | 2: 0ffa16a9088e Three - test | |
|
183 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
184 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
185 | 185 | ==== qref |
|
186 | 186 | adding 3 |
|
187 | 187 | From: test |
|
188 | 188 | |
|
189 | 189 | Three |
|
190 | 190 | |
|
191 | 191 | diff -r ... 3 |
|
192 | 192 | --- /dev/null |
|
193 | 193 | +++ b/3 |
|
194 | 194 | @@ -0,0 +1,1 @@ |
|
195 | 195 | +3 |
|
196 | 2: Three - test | |
|
197 | 1: [mq]: 2.patch - jane | |
|
198 | 0: [mq]: 1.patch - mary | |
|
196 | 2: 83f1290c6086 Three - test | |
|
197 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
198 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
199 | 199 | ==== qref -m |
|
200 | 200 | From: test |
|
201 | 201 | |
|
202 | 202 | Drei |
|
203 | 203 | |
|
204 | 204 | diff -r ... 3 |
|
205 | 205 | --- /dev/null |
|
206 | 206 | +++ b/3 |
|
207 | 207 | @@ -0,0 +1,1 @@ |
|
208 | 208 | +3 |
|
209 | 2: Drei - test | |
|
210 | 1: [mq]: 2.patch - jane | |
|
211 | 0: [mq]: 1.patch - mary | |
|
209 | 2: b0d856328d4d Drei - test | |
|
210 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
211 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
212 | 212 | ==== qref -u |
|
213 | 213 | From: mary |
|
214 | 214 | |
|
215 | 215 | Drei |
|
216 | 216 | |
|
217 | 217 | diff -r ... 3 |
|
218 | 218 | --- /dev/null |
|
219 | 219 | +++ b/3 |
|
220 | 220 | @@ -0,0 +1,1 @@ |
|
221 | 221 | +3 |
|
222 | 2: Drei - mary | |
|
223 | 1: [mq]: 2.patch - jane | |
|
224 | 0: [mq]: 1.patch - mary | |
|
222 | 2: bb9d4b28e6a6 Drei - mary | |
|
223 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
224 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
225 | 225 | ==== qref -u -m |
|
226 | 226 | From: maria |
|
227 | 227 | |
|
228 | 228 | Three (again) |
|
229 | 229 | |
|
230 | 230 | diff -r ... 3 |
|
231 | 231 | --- /dev/null |
|
232 | 232 | +++ b/3 |
|
233 | 233 | @@ -0,0 +1,1 @@ |
|
234 | 234 | +3 |
|
235 | 2: Three (again) - maria | |
|
236 | 1: [mq]: 2.patch - jane | |
|
237 | 0: [mq]: 1.patch - mary | |
|
235 | 2: a6686ee84fc3 Three (again) - maria | |
|
236 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
237 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
238 | 238 | ==== qnew -m |
|
239 | 239 | adding 4of |
|
240 | 240 | Four |
|
241 | 241 | |
|
242 | 242 | diff -r ... 4of |
|
243 | 243 | --- /dev/null |
|
244 | 244 | +++ b/4of |
|
245 | 245 | @@ -0,0 +1,1 @@ |
|
246 | 246 | +4 t |
|
247 | 3: Four - test | |
|
248 | 2: Three (again) - maria | |
|
249 | 1: [mq]: 2.patch - jane | |
|
250 | 0: [mq]: 1.patch - mary | |
|
247 | 3: b9f922d0da40 Four - test | |
|
248 | 2: a6686ee84fc3 Three (again) - maria | |
|
249 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
250 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
251 | 251 | ==== qref -u |
|
252 | 252 | From: jane |
|
253 | 253 | |
|
254 | 254 | Four |
|
255 | 255 | |
|
256 | 256 | diff -r ... 4of |
|
257 | 257 | --- /dev/null |
|
258 | 258 | +++ b/4of |
|
259 | 259 | @@ -0,0 +1,1 @@ |
|
260 | 260 | +4 t |
|
261 | 3: Four - jane | |
|
262 | 2: Three (again) - maria | |
|
263 | 1: [mq]: 2.patch - jane | |
|
264 | 0: [mq]: 1.patch - mary | |
|
261 | 3: 0dfb3111e7ee Four - jane | |
|
262 | 2: a6686ee84fc3 Three (again) - maria | |
|
263 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
264 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
265 | 265 | ==== qnew with HG header |
|
266 | 266 | popping 5.patch |
|
267 | 267 | now at: 4.patch |
|
268 | 268 | now at: 5.patch |
|
269 | 269 | # HG changeset patch |
|
270 | 270 | # User johndoe |
|
271 | 4: imported patch 5.patch - johndoe | |
|
272 | 3: Four - jane | |
|
273 | 2: Three (again) - maria | |
|
274 | 1: [mq]: 2.patch - jane | |
|
275 | 0: [mq]: 1.patch - mary | |
|
271 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
|
272 | 3: 0dfb3111e7ee Four - jane | |
|
273 | 2: a6686ee84fc3 Three (again) - maria | |
|
274 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
275 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
276 | 276 | ==== hg qref |
|
277 | 277 | adding 5 |
|
278 | 278 | # HG changeset patch |
|
279 | 279 | # User johndoe |
|
280 | 280 | # Parent |
|
281 | 281 | |
|
282 | 282 | diff -r ... 5 |
|
283 | 283 | --- /dev/null |
|
284 | 284 | +++ b/5 |
|
285 | 285 | @@ -0,0 +1,1 @@ |
|
286 | 286 | +5 |
|
287 | 4: [mq]: 5.patch - johndoe | |
|
288 | 3: Four - jane | |
|
289 | 2: Three (again) - maria | |
|
290 | 1: [mq]: 2.patch - jane | |
|
291 | 0: [mq]: 1.patch - mary | |
|
287 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
|
288 | 3: 0dfb3111e7ee Four - jane | |
|
289 | 2: a6686ee84fc3 Three (again) - maria | |
|
290 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
291 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
292 | 292 | ==== hg qref -U |
|
293 | 293 | # HG changeset patch |
|
294 | 294 | # User test |
|
295 | 295 | # Parent |
|
296 | 296 | |
|
297 | 297 | diff -r ... 5 |
|
298 | 298 | --- /dev/null |
|
299 | 299 | +++ b/5 |
|
300 | 300 | @@ -0,0 +1,1 @@ |
|
301 | 301 | +5 |
|
302 | 4: [mq]: 5.patch - test | |
|
303 | 3: Four - jane | |
|
304 | 2: Three (again) - maria | |
|
305 | 1: [mq]: 2.patch - jane | |
|
306 | 0: [mq]: 1.patch - mary | |
|
302 | 4: c947416c22b1 [mq]: 5.patch - test | |
|
303 | 3: 0dfb3111e7ee Four - jane | |
|
304 | 2: a6686ee84fc3 Three (again) - maria | |
|
305 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
306 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
307 | 307 | ==== hg qref -u |
|
308 | 308 | # HG changeset patch |
|
309 | 309 | # User johndeere |
|
310 | 310 | # Parent |
|
311 | 311 | |
|
312 | 312 | diff -r ... 5 |
|
313 | 313 | --- /dev/null |
|
314 | 314 | +++ b/5 |
|
315 | 315 | @@ -0,0 +1,1 @@ |
|
316 | 316 | +5 |
|
317 | 4: [mq]: 5.patch - johndeere | |
|
318 | 3: Four - jane | |
|
319 | 2: Three (again) - maria | |
|
320 | 1: [mq]: 2.patch - jane | |
|
321 | 0: [mq]: 1.patch - mary | |
|
317 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
318 | 3: 0dfb3111e7ee Four - jane | |
|
319 | 2: a6686ee84fc3 Three (again) - maria | |
|
320 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
321 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
322 | 322 | ==== qnew with plain header |
|
323 | 323 | popping 6.patch |
|
324 | 324 | now at: 5.patch |
|
325 | 325 | now at: 6.patch |
|
326 | 326 | From: test |
|
327 | 327 | |
|
328 | 5: imported patch 6.patch - test | |
|
329 | 4: [mq]: 5.patch - johndeere | |
|
330 | 3: Four - jane | |
|
331 | 2: Three (again) - maria | |
|
332 | 1: [mq]: 2.patch - jane | |
|
333 | 0: [mq]: 1.patch - mary | |
|
328 | 5: 7825a18ec839 imported patch 6.patch - test | |
|
329 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
330 | 3: 0dfb3111e7ee Four - jane | |
|
331 | 2: a6686ee84fc3 Three (again) - maria | |
|
332 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
333 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
334 | 334 | ==== hg qref |
|
335 | 335 | adding 6 |
|
336 | 336 | From: test |
|
337 | 337 | |
|
338 | 338 | diff -r ... 6 |
|
339 | 339 | --- /dev/null |
|
340 | 340 | +++ b/6 |
|
341 | 341 | @@ -0,0 +1,1 @@ |
|
342 | 342 | +6 |
|
343 | 5: [mq]: 6.patch - test | |
|
344 | 4: [mq]: 5.patch - johndeere | |
|
345 | 3: Four - jane | |
|
346 | 2: Three (again) - maria | |
|
347 | 1: [mq]: 2.patch - jane | |
|
348 | 0: [mq]: 1.patch - mary | |
|
343 | 5: 09d19592680d [mq]: 6.patch - test | |
|
344 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
345 | 3: 0dfb3111e7ee Four - jane | |
|
346 | 2: a6686ee84fc3 Three (again) - maria | |
|
347 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
348 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
349 | 349 | ==== hg qref -U |
|
350 | 350 | From: test |
|
351 | 351 | |
|
352 | 352 | diff -r ... 6 |
|
353 | 353 | --- /dev/null |
|
354 | 354 | +++ b/6 |
|
355 | 355 | @@ -0,0 +1,1 @@ |
|
356 | 356 | +6 |
|
357 | 5: [mq]: 6.patch - test | |
|
358 | 4: [mq]: 5.patch - johndeere | |
|
359 | 3: Four - jane | |
|
360 | 2: Three (again) - maria | |
|
361 | 1: [mq]: 2.patch - jane | |
|
362 | 0: [mq]: 1.patch - mary | |
|
357 | 5: 09d19592680d [mq]: 6.patch - test | |
|
358 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
359 | 3: 0dfb3111e7ee Four - jane | |
|
360 | 2: a6686ee84fc3 Three (again) - maria | |
|
361 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
362 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
363 | 363 | ==== hg qref -u |
|
364 | 364 | From: johndeere |
|
365 | 365 | |
|
366 | 366 | diff -r ... 6 |
|
367 | 367 | --- /dev/null |
|
368 | 368 | +++ b/6 |
|
369 | 369 | @@ -0,0 +1,1 @@ |
|
370 | 370 | +6 |
|
371 | 5: [mq]: 6.patch - johndeere | |
|
372 | 4: [mq]: 5.patch - johndeere | |
|
373 | 3: Four - jane | |
|
374 | 2: Three (again) - maria | |
|
375 | 1: [mq]: 2.patch - jane | |
|
376 | 0: [mq]: 1.patch - mary | |
|
371 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
|
372 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
373 | 3: 0dfb3111e7ee Four - jane | |
|
374 | 2: a6686ee84fc3 Three (again) - maria | |
|
375 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
376 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
377 | 377 | ==== qpop -a / qpush -a |
|
378 | 378 | popping 6.patch |
|
379 | 379 | popping 5.patch |
|
380 | 380 | popping 4.patch |
|
381 | 381 | popping 3.patch |
|
382 | 382 | popping 2.patch |
|
383 | 383 | popping 1.patch |
|
384 | 384 | patch queue now empty |
|
385 | 385 | applying 1.patch |
|
386 | 386 | applying 2.patch |
|
387 | 387 | applying 3.patch |
|
388 | 388 | applying 4.patch |
|
389 | 389 | applying 5.patch |
|
390 | 390 | applying 6.patch |
|
391 | 391 | now at: 6.patch |
|
392 | 5: imported patch 6.patch - johndeere | |
|
393 | 4: imported patch 5.patch - johndeere | |
|
394 | 3: Four - jane | |
|
395 | 2: Three (again) - maria | |
|
396 | 1: imported patch 2.patch - jane | |
|
397 | 0: imported patch 1.patch - mary | |
|
392 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
|
393 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
|
394 | 3: c7147533d3cd Four - jane | |
|
395 | 2: b383d04401ea Three (again) - maria | |
|
396 | 1: fac2da4efc3c imported patch 2.patch - jane | |
|
397 | 0: b6e237e8771b imported patch 1.patch - mary | |
|
398 | 398 | $ rm -r sandbox |
|
399 | 399 | |
|
400 | 400 | ======= hg headers |
|
401 | 401 | |
|
402 | 402 | $ echo "plain=false" >> $HGRCPATH |
|
403 | 403 | $ mkdir sandbox |
|
404 | 404 | $ (cd sandbox ; runtest) |
|
405 | 405 | ==== init |
|
406 | 406 | ==== qnew -U |
|
407 | 407 | # HG changeset patch |
|
408 | 408 | # User test |
|
409 | 409 | # Parent |
|
410 | 410 | |
|
411 | 0: [mq]: 1.patch - test | |
|
411 | 0: a054644889e5 [mq]: 1.patch - test | |
|
412 | 412 | ==== qref |
|
413 | 413 | adding 1 |
|
414 | 414 | # HG changeset patch |
|
415 | 415 | # User test |
|
416 | 416 | # Parent |
|
417 | 417 | |
|
418 | 418 | diff -r ... 1 |
|
419 | 419 | --- /dev/null |
|
420 | 420 | +++ b/1 |
|
421 | 421 | @@ -0,0 +1,1 @@ |
|
422 | 422 | +1 |
|
423 | 0: [mq]: 1.patch - test | |
|
423 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
|
424 | 424 | ==== qref -u |
|
425 | 425 | # HG changeset patch |
|
426 | 426 | # User mary |
|
427 | 427 | # Parent |
|
428 | 428 | |
|
429 | 429 | diff -r ... 1 |
|
430 | 430 | --- /dev/null |
|
431 | 431 | +++ b/1 |
|
432 | 432 | @@ -0,0 +1,1 @@ |
|
433 | 433 | +1 |
|
434 | 0: [mq]: 1.patch - mary | |
|
434 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
435 | 435 | ==== qnew |
|
436 | 436 | adding 2 |
|
437 | 437 | # HG changeset patch |
|
438 | 438 | # Parent |
|
439 | 439 | |
|
440 | 440 | diff -r ... 2 |
|
441 | 441 | --- /dev/null |
|
442 | 442 | +++ b/2 |
|
443 | 443 | @@ -0,0 +1,1 @@ |
|
444 | 444 | +2 |
|
445 | 1: [mq]: 2.patch - test | |
|
446 | 0: [mq]: 1.patch - mary | |
|
445 | 1: 527f98a12a7a [mq]: 2.patch - test | |
|
446 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
447 | 447 | ==== qref -u |
|
448 | 448 | # HG changeset patch |
|
449 | 449 | # User jane |
|
450 | 450 | # Parent |
|
451 | 451 | |
|
452 | 452 | diff -r ... 2 |
|
453 | 453 | --- /dev/null |
|
454 | 454 | +++ b/2 |
|
455 | 455 | @@ -0,0 +1,1 @@ |
|
456 | 456 | +2 |
|
457 | 1: [mq]: 2.patch - jane | |
|
458 | 0: [mq]: 1.patch - mary | |
|
457 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
458 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
459 | 459 | ==== qnew -U -m |
|
460 | 460 | # HG changeset patch |
|
461 | 461 | # User test |
|
462 | 462 | # Parent |
|
463 | 463 | Three |
|
464 | 464 | |
|
465 | 2: Three - test | |
|
466 | 1: [mq]: 2.patch - jane | |
|
467 | 0: [mq]: 1.patch - mary | |
|
465 | 2: 0ffa16a9088e Three - test | |
|
466 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
467 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
468 | 468 | ==== qref |
|
469 | 469 | adding 3 |
|
470 | 470 | # HG changeset patch |
|
471 | 471 | # User test |
|
472 | 472 | # Parent |
|
473 | 473 | Three |
|
474 | 474 | |
|
475 | 475 | diff -r ... 3 |
|
476 | 476 | --- /dev/null |
|
477 | 477 | +++ b/3 |
|
478 | 478 | @@ -0,0 +1,1 @@ |
|
479 | 479 | +3 |
|
480 | 2: Three - test | |
|
481 | 1: [mq]: 2.patch - jane | |
|
482 | 0: [mq]: 1.patch - mary | |
|
480 | 2: 83f1290c6086 Three - test | |
|
481 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
482 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
483 | 483 | ==== qref -m |
|
484 | 484 | # HG changeset patch |
|
485 | 485 | # User test |
|
486 | 486 | # Parent |
|
487 | 487 | Drei |
|
488 | 488 | |
|
489 | 489 | diff -r ... 3 |
|
490 | 490 | --- /dev/null |
|
491 | 491 | +++ b/3 |
|
492 | 492 | @@ -0,0 +1,1 @@ |
|
493 | 493 | +3 |
|
494 | 2: Drei - test | |
|
495 | 1: [mq]: 2.patch - jane | |
|
496 | 0: [mq]: 1.patch - mary | |
|
494 | 2: b0d856328d4d Drei - test | |
|
495 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
496 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
497 | 497 | ==== qref -u |
|
498 | 498 | # HG changeset patch |
|
499 | 499 | # User mary |
|
500 | 500 | # Parent |
|
501 | 501 | Drei |
|
502 | 502 | |
|
503 | 503 | diff -r ... 3 |
|
504 | 504 | --- /dev/null |
|
505 | 505 | +++ b/3 |
|
506 | 506 | @@ -0,0 +1,1 @@ |
|
507 | 507 | +3 |
|
508 | 2: Drei - mary | |
|
509 | 1: [mq]: 2.patch - jane | |
|
510 | 0: [mq]: 1.patch - mary | |
|
508 | 2: bb9d4b28e6a6 Drei - mary | |
|
509 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
510 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
511 | 511 | ==== qref -u -m |
|
512 | 512 | # HG changeset patch |
|
513 | 513 | # User maria |
|
514 | 514 | # Parent |
|
515 | 515 | Three (again) |
|
516 | 516 | |
|
517 | 517 | diff -r ... 3 |
|
518 | 518 | --- /dev/null |
|
519 | 519 | +++ b/3 |
|
520 | 520 | @@ -0,0 +1,1 @@ |
|
521 | 521 | +3 |
|
522 | 2: Three (again) - maria | |
|
523 | 1: [mq]: 2.patch - jane | |
|
524 | 0: [mq]: 1.patch - mary | |
|
522 | 2: a6686ee84fc3 Three (again) - maria | |
|
523 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
524 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
525 | 525 | ==== qnew -m |
|
526 | 526 | adding 4of |
|
527 | 527 | # HG changeset patch |
|
528 | 528 | # Parent |
|
529 | 529 | Four |
|
530 | 530 | |
|
531 | 531 | diff -r ... 4of |
|
532 | 532 | --- /dev/null |
|
533 | 533 | +++ b/4of |
|
534 | 534 | @@ -0,0 +1,1 @@ |
|
535 | 535 | +4 t |
|
536 | 3: Four - test | |
|
537 | 2: Three (again) - maria | |
|
538 | 1: [mq]: 2.patch - jane | |
|
539 | 0: [mq]: 1.patch - mary | |
|
536 | 3: b9f922d0da40 Four - test | |
|
537 | 2: a6686ee84fc3 Three (again) - maria | |
|
538 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
539 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
540 | 540 | ==== qref -u |
|
541 | 541 | # HG changeset patch |
|
542 | 542 | # User jane |
|
543 | 543 | # Parent |
|
544 | 544 | Four |
|
545 | 545 | |
|
546 | 546 | diff -r ... 4of |
|
547 | 547 | --- /dev/null |
|
548 | 548 | +++ b/4of |
|
549 | 549 | @@ -0,0 +1,1 @@ |
|
550 | 550 | +4 t |
|
551 | 3: Four - jane | |
|
552 | 2: Three (again) - maria | |
|
553 | 1: [mq]: 2.patch - jane | |
|
554 | 0: [mq]: 1.patch - mary | |
|
551 | 3: 0dfb3111e7ee Four - jane | |
|
552 | 2: a6686ee84fc3 Three (again) - maria | |
|
553 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
554 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
555 | 555 | ==== qnew with HG header |
|
556 | 556 | popping 5.patch |
|
557 | 557 | now at: 4.patch |
|
558 | 558 | now at: 5.patch |
|
559 | 559 | # HG changeset patch |
|
560 | 560 | # User johndoe |
|
561 | 4: imported patch 5.patch - johndoe | |
|
562 | 3: Four - jane | |
|
563 | 2: Three (again) - maria | |
|
564 | 1: [mq]: 2.patch - jane | |
|
565 | 0: [mq]: 1.patch - mary | |
|
561 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
|
562 | 3: 0dfb3111e7ee Four - jane | |
|
563 | 2: a6686ee84fc3 Three (again) - maria | |
|
564 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
565 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
566 | 566 | ==== hg qref |
|
567 | 567 | adding 5 |
|
568 | 568 | # HG changeset patch |
|
569 | 569 | # User johndoe |
|
570 | 570 | # Parent |
|
571 | 571 | |
|
572 | 572 | diff -r ... 5 |
|
573 | 573 | --- /dev/null |
|
574 | 574 | +++ b/5 |
|
575 | 575 | @@ -0,0 +1,1 @@ |
|
576 | 576 | +5 |
|
577 | 4: [mq]: 5.patch - johndoe | |
|
578 | 3: Four - jane | |
|
579 | 2: Three (again) - maria | |
|
580 | 1: [mq]: 2.patch - jane | |
|
581 | 0: [mq]: 1.patch - mary | |
|
577 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
|
578 | 3: 0dfb3111e7ee Four - jane | |
|
579 | 2: a6686ee84fc3 Three (again) - maria | |
|
580 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
581 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
582 | 582 | ==== hg qref -U |
|
583 | 583 | # HG changeset patch |
|
584 | 584 | # User test |
|
585 | 585 | # Parent |
|
586 | 586 | |
|
587 | 587 | diff -r ... 5 |
|
588 | 588 | --- /dev/null |
|
589 | 589 | +++ b/5 |
|
590 | 590 | @@ -0,0 +1,1 @@ |
|
591 | 591 | +5 |
|
592 | 4: [mq]: 5.patch - test | |
|
593 | 3: Four - jane | |
|
594 | 2: Three (again) - maria | |
|
595 | 1: [mq]: 2.patch - jane | |
|
596 | 0: [mq]: 1.patch - mary | |
|
592 | 4: c947416c22b1 [mq]: 5.patch - test | |
|
593 | 3: 0dfb3111e7ee Four - jane | |
|
594 | 2: a6686ee84fc3 Three (again) - maria | |
|
595 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
596 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
597 | 597 | ==== hg qref -u |
|
598 | 598 | # HG changeset patch |
|
599 | 599 | # User johndeere |
|
600 | 600 | # Parent |
|
601 | 601 | |
|
602 | 602 | diff -r ... 5 |
|
603 | 603 | --- /dev/null |
|
604 | 604 | +++ b/5 |
|
605 | 605 | @@ -0,0 +1,1 @@ |
|
606 | 606 | +5 |
|
607 | 4: [mq]: 5.patch - johndeere | |
|
608 | 3: Four - jane | |
|
609 | 2: Three (again) - maria | |
|
610 | 1: [mq]: 2.patch - jane | |
|
611 | 0: [mq]: 1.patch - mary | |
|
607 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
608 | 3: 0dfb3111e7ee Four - jane | |
|
609 | 2: a6686ee84fc3 Three (again) - maria | |
|
610 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
611 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
612 | 612 | ==== qnew with plain header |
|
613 | 613 | popping 6.patch |
|
614 | 614 | now at: 5.patch |
|
615 | 615 | now at: 6.patch |
|
616 | 616 | From: test |
|
617 | 617 | |
|
618 | 5: imported patch 6.patch - test | |
|
619 | 4: [mq]: 5.patch - johndeere | |
|
620 | 3: Four - jane | |
|
621 | 2: Three (again) - maria | |
|
622 | 1: [mq]: 2.patch - jane | |
|
623 | 0: [mq]: 1.patch - mary | |
|
618 | 5: 7825a18ec839 imported patch 6.patch - test | |
|
619 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
620 | 3: 0dfb3111e7ee Four - jane | |
|
621 | 2: a6686ee84fc3 Three (again) - maria | |
|
622 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
623 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
624 | 624 | ==== hg qref |
|
625 | 625 | adding 6 |
|
626 | 626 | From: test |
|
627 | 627 | |
|
628 | 628 | diff -r ... 6 |
|
629 | 629 | --- /dev/null |
|
630 | 630 | +++ b/6 |
|
631 | 631 | @@ -0,0 +1,1 @@ |
|
632 | 632 | +6 |
|
633 | 5: [mq]: 6.patch - test | |
|
634 | 4: [mq]: 5.patch - johndeere | |
|
635 | 3: Four - jane | |
|
636 | 2: Three (again) - maria | |
|
637 | 1: [mq]: 2.patch - jane | |
|
638 | 0: [mq]: 1.patch - mary | |
|
633 | 5: 09d19592680d [mq]: 6.patch - test | |
|
634 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
635 | 3: 0dfb3111e7ee Four - jane | |
|
636 | 2: a6686ee84fc3 Three (again) - maria | |
|
637 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
638 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
639 | 639 | ==== hg qref -U |
|
640 | 640 | From: test |
|
641 | 641 | |
|
642 | 642 | diff -r ... 6 |
|
643 | 643 | --- /dev/null |
|
644 | 644 | +++ b/6 |
|
645 | 645 | @@ -0,0 +1,1 @@ |
|
646 | 646 | +6 |
|
647 | 5: [mq]: 6.patch - test | |
|
648 | 4: [mq]: 5.patch - johndeere | |
|
649 | 3: Four - jane | |
|
650 | 2: Three (again) - maria | |
|
651 | 1: [mq]: 2.patch - jane | |
|
652 | 0: [mq]: 1.patch - mary | |
|
647 | 5: 09d19592680d [mq]: 6.patch - test | |
|
648 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
649 | 3: 0dfb3111e7ee Four - jane | |
|
650 | 2: a6686ee84fc3 Three (again) - maria | |
|
651 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
652 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
653 | 653 | ==== hg qref -u |
|
654 | 654 | From: johndeere |
|
655 | 655 | |
|
656 | 656 | diff -r ... 6 |
|
657 | 657 | --- /dev/null |
|
658 | 658 | +++ b/6 |
|
659 | 659 | @@ -0,0 +1,1 @@ |
|
660 | 660 | +6 |
|
661 | 5: [mq]: 6.patch - johndeere | |
|
662 | 4: [mq]: 5.patch - johndeere | |
|
663 | 3: Four - jane | |
|
664 | 2: Three (again) - maria | |
|
665 | 1: [mq]: 2.patch - jane | |
|
666 | 0: [mq]: 1.patch - mary | |
|
661 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
|
662 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
663 | 3: 0dfb3111e7ee Four - jane | |
|
664 | 2: a6686ee84fc3 Three (again) - maria | |
|
665 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
666 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
667 | 667 | ==== qpop -a / qpush -a |
|
668 | 668 | popping 6.patch |
|
669 | 669 | popping 5.patch |
|
670 | 670 | popping 4.patch |
|
671 | 671 | popping 3.patch |
|
672 | 672 | popping 2.patch |
|
673 | 673 | popping 1.patch |
|
674 | 674 | patch queue now empty |
|
675 | 675 | applying 1.patch |
|
676 | 676 | applying 2.patch |
|
677 | 677 | applying 3.patch |
|
678 | 678 | applying 4.patch |
|
679 | 679 | applying 5.patch |
|
680 | 680 | applying 6.patch |
|
681 | 681 | now at: 6.patch |
|
682 | 5: imported patch 6.patch - johndeere | |
|
683 | 4: imported patch 5.patch - johndeere | |
|
684 | 3: Four - jane | |
|
685 | 2: Three (again) - maria | |
|
686 | 1: imported patch 2.patch - jane | |
|
687 | 0: imported patch 1.patch - mary | |
|
682 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
|
683 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
|
684 | 3: c7147533d3cd Four - jane | |
|
685 | 2: b383d04401ea Three (again) - maria | |
|
686 | 1: fac2da4efc3c imported patch 2.patch - jane | |
|
687 | 0: b6e237e8771b imported patch 1.patch - mary | |
|
688 | 688 | $ rm -r sandbox |
|
689 | 689 | $ runtest |
|
690 | 690 | ==== init |
|
691 | 691 | ==== qnew -U |
|
692 | 692 | # HG changeset patch |
|
693 | 693 | # User test |
|
694 | 694 | # Parent |
|
695 | 695 | |
|
696 | 0: [mq]: 1.patch - test | |
|
696 | 0: a054644889e5 [mq]: 1.patch - test | |
|
697 | 697 | ==== qref |
|
698 | 698 | adding 1 |
|
699 | 699 | # HG changeset patch |
|
700 | 700 | # User test |
|
701 | 701 | # Parent |
|
702 | 702 | |
|
703 | 703 | diff -r ... 1 |
|
704 | 704 | --- /dev/null |
|
705 | 705 | +++ b/1 |
|
706 | 706 | @@ -0,0 +1,1 @@ |
|
707 | 707 | +1 |
|
708 | 0: [mq]: 1.patch - test | |
|
708 | 0: 2905f1e46ee0 [mq]: 1.patch - test | |
|
709 | 709 | ==== qref -u |
|
710 | 710 | # HG changeset patch |
|
711 | 711 | # User mary |
|
712 | 712 | # Parent |
|
713 | 713 | |
|
714 | 714 | diff -r ... 1 |
|
715 | 715 | --- /dev/null |
|
716 | 716 | +++ b/1 |
|
717 | 717 | @@ -0,0 +1,1 @@ |
|
718 | 718 | +1 |
|
719 | 0: [mq]: 1.patch - mary | |
|
719 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
720 | 720 | ==== qnew |
|
721 | 721 | adding 2 |
|
722 | 722 | # HG changeset patch |
|
723 | 723 | # Parent |
|
724 | 724 | |
|
725 | 725 | diff -r ... 2 |
|
726 | 726 | --- /dev/null |
|
727 | 727 | +++ b/2 |
|
728 | 728 | @@ -0,0 +1,1 @@ |
|
729 | 729 | +2 |
|
730 | 1: [mq]: 2.patch - test | |
|
731 | 0: [mq]: 1.patch - mary | |
|
730 | 1: 527f98a12a7a [mq]: 2.patch - test | |
|
731 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
732 | 732 | ==== qref -u |
|
733 | 733 | # HG changeset patch |
|
734 | 734 | # User jane |
|
735 | 735 | # Parent |
|
736 | 736 | |
|
737 | 737 | diff -r ... 2 |
|
738 | 738 | --- /dev/null |
|
739 | 739 | +++ b/2 |
|
740 | 740 | @@ -0,0 +1,1 @@ |
|
741 | 741 | +2 |
|
742 | 1: [mq]: 2.patch - jane | |
|
743 | 0: [mq]: 1.patch - mary | |
|
742 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
743 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
744 | 744 | ==== qnew -U -m |
|
745 | 745 | # HG changeset patch |
|
746 | 746 | # User test |
|
747 | 747 | # Parent |
|
748 | 748 | Three |
|
749 | 749 | |
|
750 | 2: Three - test | |
|
751 | 1: [mq]: 2.patch - jane | |
|
752 | 0: [mq]: 1.patch - mary | |
|
750 | 2: 0ffa16a9088e Three - test | |
|
751 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
752 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
753 | 753 | ==== qref |
|
754 | 754 | adding 3 |
|
755 | 755 | # HG changeset patch |
|
756 | 756 | # User test |
|
757 | 757 | # Parent |
|
758 | 758 | Three |
|
759 | 759 | |
|
760 | 760 | diff -r ... 3 |
|
761 | 761 | --- /dev/null |
|
762 | 762 | +++ b/3 |
|
763 | 763 | @@ -0,0 +1,1 @@ |
|
764 | 764 | +3 |
|
765 | 2: Three - test | |
|
766 | 1: [mq]: 2.patch - jane | |
|
767 | 0: [mq]: 1.patch - mary | |
|
765 | 2: 83f1290c6086 Three - test | |
|
766 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
767 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
768 | 768 | ==== qref -m |
|
769 | 769 | # HG changeset patch |
|
770 | 770 | # User test |
|
771 | 771 | # Parent |
|
772 | 772 | Drei |
|
773 | 773 | |
|
774 | 774 | diff -r ... 3 |
|
775 | 775 | --- /dev/null |
|
776 | 776 | +++ b/3 |
|
777 | 777 | @@ -0,0 +1,1 @@ |
|
778 | 778 | +3 |
|
779 | 2: Drei - test | |
|
780 | 1: [mq]: 2.patch - jane | |
|
781 | 0: [mq]: 1.patch - mary | |
|
779 | 2: b0d856328d4d Drei - test | |
|
780 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
781 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
782 | 782 | ==== qref -u |
|
783 | 783 | # HG changeset patch |
|
784 | 784 | # User mary |
|
785 | 785 | # Parent |
|
786 | 786 | Drei |
|
787 | 787 | |
|
788 | 788 | diff -r ... 3 |
|
789 | 789 | --- /dev/null |
|
790 | 790 | +++ b/3 |
|
791 | 791 | @@ -0,0 +1,1 @@ |
|
792 | 792 | +3 |
|
793 | 2: Drei - mary | |
|
794 | 1: [mq]: 2.patch - jane | |
|
795 | 0: [mq]: 1.patch - mary | |
|
793 | 2: bb9d4b28e6a6 Drei - mary | |
|
794 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
795 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
796 | 796 | ==== qref -u -m |
|
797 | 797 | # HG changeset patch |
|
798 | 798 | # User maria |
|
799 | 799 | # Parent |
|
800 | 800 | Three (again) |
|
801 | 801 | |
|
802 | 802 | diff -r ... 3 |
|
803 | 803 | --- /dev/null |
|
804 | 804 | +++ b/3 |
|
805 | 805 | @@ -0,0 +1,1 @@ |
|
806 | 806 | +3 |
|
807 | 2: Three (again) - maria | |
|
808 | 1: [mq]: 2.patch - jane | |
|
809 | 0: [mq]: 1.patch - mary | |
|
807 | 2: a6686ee84fc3 Three (again) - maria | |
|
808 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
809 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
810 | 810 | ==== qnew -m |
|
811 | 811 | adding 4of |
|
812 | 812 | # HG changeset patch |
|
813 | 813 | # Parent |
|
814 | 814 | Four |
|
815 | 815 | |
|
816 | 816 | diff -r ... 4of |
|
817 | 817 | --- /dev/null |
|
818 | 818 | +++ b/4of |
|
819 | 819 | @@ -0,0 +1,1 @@ |
|
820 | 820 | +4 t |
|
821 | 3: Four - test | |
|
822 | 2: Three (again) - maria | |
|
823 | 1: [mq]: 2.patch - jane | |
|
824 | 0: [mq]: 1.patch - mary | |
|
821 | 3: b9f922d0da40 Four - test | |
|
822 | 2: a6686ee84fc3 Three (again) - maria | |
|
823 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
824 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
825 | 825 | ==== qref -u |
|
826 | 826 | # HG changeset patch |
|
827 | 827 | # User jane |
|
828 | 828 | # Parent |
|
829 | 829 | Four |
|
830 | 830 | |
|
831 | 831 | diff -r ... 4of |
|
832 | 832 | --- /dev/null |
|
833 | 833 | +++ b/4of |
|
834 | 834 | @@ -0,0 +1,1 @@ |
|
835 | 835 | +4 t |
|
836 | 3: Four - jane | |
|
837 | 2: Three (again) - maria | |
|
838 | 1: [mq]: 2.patch - jane | |
|
839 | 0: [mq]: 1.patch - mary | |
|
836 | 3: 0dfb3111e7ee Four - jane | |
|
837 | 2: a6686ee84fc3 Three (again) - maria | |
|
838 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
839 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
840 | 840 | ==== qnew with HG header |
|
841 | 841 | popping 5.patch |
|
842 | 842 | now at: 4.patch |
|
843 | 843 | now at: 5.patch |
|
844 | 844 | # HG changeset patch |
|
845 | 845 | # User johndoe |
|
846 | 4: imported patch 5.patch - johndoe | |
|
847 | 3: Four - jane | |
|
848 | 2: Three (again) - maria | |
|
849 | 1: [mq]: 2.patch - jane | |
|
850 | 0: [mq]: 1.patch - mary | |
|
846 | 4: 72bc4a0467ef imported patch 5.patch - johndoe | |
|
847 | 3: 0dfb3111e7ee Four - jane | |
|
848 | 2: a6686ee84fc3 Three (again) - maria | |
|
849 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
850 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
851 | 851 | ==== hg qref |
|
852 | 852 | adding 5 |
|
853 | 853 | # HG changeset patch |
|
854 | 854 | # User johndoe |
|
855 | 855 | # Parent |
|
856 | 856 | |
|
857 | 857 | diff -r ... 5 |
|
858 | 858 | --- /dev/null |
|
859 | 859 | +++ b/5 |
|
860 | 860 | @@ -0,0 +1,1 @@ |
|
861 | 861 | +5 |
|
862 | 4: [mq]: 5.patch - johndoe | |
|
863 | 3: Four - jane | |
|
864 | 2: Three (again) - maria | |
|
865 | 1: [mq]: 2.patch - jane | |
|
866 | 0: [mq]: 1.patch - mary | |
|
862 | 4: ff5c06112e5a [mq]: 5.patch - johndoe | |
|
863 | 3: 0dfb3111e7ee Four - jane | |
|
864 | 2: a6686ee84fc3 Three (again) - maria | |
|
865 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
866 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
867 | 867 | ==== hg qref -U |
|
868 | 868 | # HG changeset patch |
|
869 | 869 | # User test |
|
870 | 870 | # Parent |
|
871 | 871 | |
|
872 | 872 | diff -r ... 5 |
|
873 | 873 | --- /dev/null |
|
874 | 874 | +++ b/5 |
|
875 | 875 | @@ -0,0 +1,1 @@ |
|
876 | 876 | +5 |
|
877 | 4: [mq]: 5.patch - test | |
|
878 | 3: Four - jane | |
|
879 | 2: Three (again) - maria | |
|
880 | 1: [mq]: 2.patch - jane | |
|
881 | 0: [mq]: 1.patch - mary | |
|
877 | 4: c947416c22b1 [mq]: 5.patch - test | |
|
878 | 3: 0dfb3111e7ee Four - jane | |
|
879 | 2: a6686ee84fc3 Three (again) - maria | |
|
880 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
881 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
882 | 882 | ==== hg qref -u |
|
883 | 883 | # HG changeset patch |
|
884 | 884 | # User johndeere |
|
885 | 885 | # Parent |
|
886 | 886 | |
|
887 | 887 | diff -r ... 5 |
|
888 | 888 | --- /dev/null |
|
889 | 889 | +++ b/5 |
|
890 | 890 | @@ -0,0 +1,1 @@ |
|
891 | 891 | +5 |
|
892 | 4: [mq]: 5.patch - johndeere | |
|
893 | 3: Four - jane | |
|
894 | 2: Three (again) - maria | |
|
895 | 1: [mq]: 2.patch - jane | |
|
896 | 0: [mq]: 1.patch - mary | |
|
892 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
893 | 3: 0dfb3111e7ee Four - jane | |
|
894 | 2: a6686ee84fc3 Three (again) - maria | |
|
895 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
896 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
897 | 897 | ==== qnew with plain header |
|
898 | 898 | popping 6.patch |
|
899 | 899 | now at: 5.patch |
|
900 | 900 | now at: 6.patch |
|
901 | 901 | From: test |
|
902 | 902 | |
|
903 | 5: imported patch 6.patch - test | |
|
904 | 4: [mq]: 5.patch - johndeere | |
|
905 | 3: Four - jane | |
|
906 | 2: Three (again) - maria | |
|
907 | 1: [mq]: 2.patch - jane | |
|
908 | 0: [mq]: 1.patch - mary | |
|
903 | 5: 7825a18ec839 imported patch 6.patch - test | |
|
904 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
905 | 3: 0dfb3111e7ee Four - jane | |
|
906 | 2: a6686ee84fc3 Three (again) - maria | |
|
907 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
908 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
909 | 909 | ==== hg qref |
|
910 | 910 | adding 6 |
|
911 | 911 | From: test |
|
912 | 912 | |
|
913 | 913 | diff -r ... 6 |
|
914 | 914 | --- /dev/null |
|
915 | 915 | +++ b/6 |
|
916 | 916 | @@ -0,0 +1,1 @@ |
|
917 | 917 | +6 |
|
918 | 5: [mq]: 6.patch - test | |
|
919 | 4: [mq]: 5.patch - johndeere | |
|
920 | 3: Four - jane | |
|
921 | 2: Three (again) - maria | |
|
922 | 1: [mq]: 2.patch - jane | |
|
923 | 0: [mq]: 1.patch - mary | |
|
918 | 5: 09d19592680d [mq]: 6.patch - test | |
|
919 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
920 | 3: 0dfb3111e7ee Four - jane | |
|
921 | 2: a6686ee84fc3 Three (again) - maria | |
|
922 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
923 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
924 | 924 | ==== hg qref -U |
|
925 | 925 | From: test |
|
926 | 926 | |
|
927 | 927 | diff -r ... 6 |
|
928 | 928 | --- /dev/null |
|
929 | 929 | +++ b/6 |
|
930 | 930 | @@ -0,0 +1,1 @@ |
|
931 | 931 | +6 |
|
932 | 5: [mq]: 6.patch - test | |
|
933 | 4: [mq]: 5.patch - johndeere | |
|
934 | 3: Four - jane | |
|
935 | 2: Three (again) - maria | |
|
936 | 1: [mq]: 2.patch - jane | |
|
937 | 0: [mq]: 1.patch - mary | |
|
932 | 5: 09d19592680d [mq]: 6.patch - test | |
|
933 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
934 | 3: 0dfb3111e7ee Four - jane | |
|
935 | 2: a6686ee84fc3 Three (again) - maria | |
|
936 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
937 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
938 | 938 | ==== hg qref -u |
|
939 | 939 | From: johndeere |
|
940 | 940 | |
|
941 | 941 | diff -r ... 6 |
|
942 | 942 | --- /dev/null |
|
943 | 943 | +++ b/6 |
|
944 | 944 | @@ -0,0 +1,1 @@ |
|
945 | 945 | +6 |
|
946 | 5: [mq]: 6.patch - johndeere | |
|
947 | 4: [mq]: 5.patch - johndeere | |
|
948 | 3: Four - jane | |
|
949 | 2: Three (again) - maria | |
|
950 | 1: [mq]: 2.patch - jane | |
|
951 | 0: [mq]: 1.patch - mary | |
|
946 | 5: 32641ee07196 [mq]: 6.patch - johndeere | |
|
947 | 4: 1d898e201a22 [mq]: 5.patch - johndeere | |
|
948 | 3: 0dfb3111e7ee Four - jane | |
|
949 | 2: a6686ee84fc3 Three (again) - maria | |
|
950 | 1: a425cde5f493 [mq]: 2.patch - jane | |
|
951 | 0: 3682f830e656 [mq]: 1.patch - mary | |
|
952 | 952 | ==== qpop -a / qpush -a |
|
953 | 953 | popping 6.patch |
|
954 | 954 | popping 5.patch |
|
955 | 955 | popping 4.patch |
|
956 | 956 | popping 3.patch |
|
957 | 957 | popping 2.patch |
|
958 | 958 | popping 1.patch |
|
959 | 959 | patch queue now empty |
|
960 | 960 | applying 1.patch |
|
961 | 961 | applying 2.patch |
|
962 | 962 | applying 3.patch |
|
963 | 963 | applying 4.patch |
|
964 | 964 | applying 5.patch |
|
965 | 965 | applying 6.patch |
|
966 | 966 | now at: 6.patch |
|
967 | 5: imported patch 6.patch - johndeere | |
|
968 | 4: imported patch 5.patch - johndeere | |
|
969 | 3: Four - jane | |
|
970 | 2: Three (again) - maria | |
|
971 | 1: imported patch 2.patch - jane | |
|
972 | 0: imported patch 1.patch - mary | |
|
967 | 5: 1fb083c80457 imported patch 6.patch - johndeere | |
|
968 | 4: 7e96e969691d imported patch 5.patch - johndeere | |
|
969 | 3: c7147533d3cd Four - jane | |
|
970 | 2: b383d04401ea Three (again) - maria | |
|
971 | 1: fac2da4efc3c imported patch 2.patch - jane | |
|
972 | 0: b6e237e8771b imported patch 1.patch - mary | |
|
973 | 973 | |
|
974 | 974 | $ cd .. |
@@ -1,137 +1,137 b'' | |||
|
1 | 1 | $ cat <<EOF >> $HGRCPATH |
|
2 | 2 | > [extensions] |
|
3 | 3 | > mq= |
|
4 | 4 | > [alias] |
|
5 | > tlog = log --template "{rev}: {desc}\\n" | |
|
5 | > tlog = log --template "{rev}: {node|short} {desc}\\n" | |
|
6 | 6 | > theads = heads --template "{rev}: {desc}\\n" |
|
7 | 7 | > tincoming = incoming --template "{rev}: {desc}\\n" |
|
8 | 8 | > EOF |
|
9 | 9 | |
|
10 | 10 | Setup main: |
|
11 | 11 | |
|
12 | 12 | $ hg init base |
|
13 | 13 | $ cd base |
|
14 | 14 | $ echo "One" > one |
|
15 | 15 | $ hg add |
|
16 | 16 | adding one |
|
17 | 17 | $ hg ci -m "main: one added" |
|
18 | 18 | $ echo "++" >> one |
|
19 | 19 | $ hg ci -m "main: one updated" |
|
20 | 20 | |
|
21 | 21 | Bundle main: |
|
22 | 22 | |
|
23 | 23 | $ hg bundle --base=null ../main.hg |
|
24 | 24 | 2 changesets found |
|
25 | 25 | |
|
26 | 26 | $ cd .. |
|
27 | 27 | |
|
28 | 28 | Incoming to fresh repo: |
|
29 | 29 | |
|
30 | 30 | $ hg init fresh |
|
31 | 31 | |
|
32 | 32 | $ hg -R fresh tincoming main.hg |
|
33 | 33 | comparing with main.hg |
|
34 | 34 | 0: main: one added |
|
35 | 35 | 1: main: one updated |
|
36 | 36 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
37 | 37 | |
|
38 | 38 | $ hg -R fresh tincoming bundle:fresh+main.hg |
|
39 | 39 | comparing with bundle:fresh+main.hg |
|
40 | 40 | 0: main: one added |
|
41 | 41 | 1: main: one updated |
|
42 | 42 | |
|
43 | 43 | |
|
44 | 44 | Setup queue: |
|
45 | 45 | |
|
46 | 46 | $ cd base |
|
47 | 47 | $ hg qinit -c |
|
48 | 48 | $ hg qnew -m "patch: two added" two.patch |
|
49 | 49 | $ echo two > two |
|
50 | 50 | $ hg add |
|
51 | 51 | adding two |
|
52 | 52 | $ hg qrefresh |
|
53 | 53 | $ hg qcommit -m "queue: two.patch added" |
|
54 | 54 | $ hg qpop -a |
|
55 | 55 | popping two.patch |
|
56 | 56 | patch queue now empty |
|
57 | 57 | |
|
58 | 58 | Bundle queue: |
|
59 | 59 | |
|
60 | 60 | $ hg -R .hg/patches bundle --base=null ../queue.hgq |
|
61 | 61 | 1 changesets found |
|
62 | 62 | $ test -f ./fresh/.hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
63 | 63 | |
|
64 | 64 | $ cd .. |
|
65 | 65 | |
|
66 | 66 | |
|
67 | 67 | Clone base: |
|
68 | 68 | |
|
69 | 69 | $ hg clone base copy |
|
70 | 70 | updating to branch default |
|
71 | 71 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 72 | $ cd copy |
|
73 | 73 | $ hg qinit -c |
|
74 | 74 | |
|
75 | 75 | Incoming queue bundle: |
|
76 | 76 | |
|
77 | 77 | $ hg -R .hg/patches tincoming ../queue.hgq |
|
78 | 78 | comparing with ../queue.hgq |
|
79 | 79 | 0: queue: two.patch added |
|
80 | 80 | $ test -f .hg/hg-bundle* && echo 'temp. bundle file remained' || true |
|
81 | 81 | |
|
82 | 82 | Pull queue bundle: |
|
83 | 83 | |
|
84 | 84 | $ hg -R .hg/patches pull --update ../queue.hgq |
|
85 | 85 | pulling from ../queue.hgq |
|
86 | 86 | requesting all changes |
|
87 | 87 | adding changesets |
|
88 | 88 | adding manifests |
|
89 | 89 | adding file changes |
|
90 | 90 | added 1 changesets with 3 changes to 3 files |
|
91 | 91 | new changesets d7553909353d |
|
92 | 92 | merging series |
|
93 | 93 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
94 | 94 | $ test -f .hg/patches/hg-bundle* && echo 'temp. bundle file remained' || true |
|
95 | 95 | |
|
96 | 96 | $ hg -R .hg/patches theads |
|
97 | 97 | 0: queue: two.patch added |
|
98 | 98 | |
|
99 | 99 | $ hg -R .hg/patches tlog |
|
100 | 0: queue: two.patch added | |
|
100 | 0: d7553909353d queue: two.patch added | |
|
101 | 101 | |
|
102 | 102 | $ hg qseries |
|
103 | 103 | two.patch |
|
104 | 104 | |
|
105 | 105 | $ cd .. |
|
106 | 106 | |
|
107 | 107 | |
|
108 | 108 | Clone base again: |
|
109 | 109 | |
|
110 | 110 | $ hg clone base copy2 |
|
111 | 111 | updating to branch default |
|
112 | 112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 113 | $ cd copy2 |
|
114 | 114 | $ hg qinit -c |
|
115 | 115 | |
|
116 | 116 | Unbundle queue bundle: |
|
117 | 117 | |
|
118 | 118 | $ hg -R .hg/patches unbundle --update ../queue.hgq |
|
119 | 119 | adding changesets |
|
120 | 120 | adding manifests |
|
121 | 121 | adding file changes |
|
122 | 122 | added 1 changesets with 3 changes to 3 files |
|
123 | 123 | new changesets d7553909353d |
|
124 | 124 | merging series |
|
125 | 125 | 2 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
126 | 126 | |
|
127 | 127 | $ hg -R .hg/patches theads |
|
128 | 128 | 0: queue: two.patch added |
|
129 | 129 | |
|
130 | 130 | $ hg -R .hg/patches tlog |
|
131 | 0: queue: two.patch added | |
|
131 | 0: d7553909353d queue: two.patch added | |
|
132 | 132 | |
|
133 | 133 | $ hg qseries |
|
134 | 134 | two.patch |
|
135 | 135 | |
|
136 | 136 | $ cd .. |
|
137 | 137 |
@@ -1,384 +1,384 b'' | |||
|
1 | 1 | Test the "--base" flag of the rebase command. (Tests unrelated to the "--base" |
|
2 | 2 | flag should probably live in somewhere else) |
|
3 | 3 | |
|
4 | 4 | $ cat >> $HGRCPATH <<EOF |
|
5 | 5 | > [extensions] |
|
6 | 6 | > rebase= |
|
7 | 7 | > drawdag=$TESTDIR/drawdag.py |
|
8 | 8 | > |
|
9 | 9 | > [phases] |
|
10 | 10 | > publish=False |
|
11 | 11 | > |
|
12 | 12 | > [alias] |
|
13 | > tglog = log -G --template "{rev}: {desc}" | |
|
13 | > tglog = log -G --template "{rev}: {node|short} {desc}" | |
|
14 | 14 | > EOF |
|
15 | 15 | |
|
16 | 16 | $ rebasewithdag() { |
|
17 | 17 | > N=`$PYTHON -c "print($N+1)"` |
|
18 | 18 | > hg init repo$N && cd repo$N |
|
19 | 19 | > hg debugdrawdag |
|
20 | 20 | > hg rebase "$@" > _rebasetmp |
|
21 | 21 | > r=$? |
|
22 | 22 | > grep -v 'saved backup bundle' _rebasetmp |
|
23 | 23 | > [ $r -eq 0 ] && hg tglog |
|
24 | 24 | > cd .. |
|
25 | 25 | > return $r |
|
26 | 26 | > } |
|
27 | 27 | |
|
28 | 28 | Single branching point, without merge: |
|
29 | 29 | |
|
30 | 30 | $ rebasewithdag -b D -d Z <<'EOS' |
|
31 | 31 | > D E |
|
32 | 32 | > |/ |
|
33 | 33 | > Z B C # C: branching point, E should be picked |
|
34 | 34 | > \|/ # B should not be picked |
|
35 | 35 | > A |
|
36 | 36 | > | |
|
37 | 37 | > R |
|
38 | 38 | > EOS |
|
39 | 39 | rebasing 3:d6003a550c2c "C" (C) |
|
40 | 40 | rebasing 5:4526cf523425 "D" (D) |
|
41 | 41 | rebasing 6:b296604d9846 "E" (E tip) |
|
42 | o 6: E | |
|
42 | o 6: 4870f5e7df37 E | |
|
43 | 43 | | |
|
44 | | o 5: D | |
|
44 | | o 5: dc999528138a D | |
|
45 | 45 | |/ |
|
46 | o 4: C | |
|
46 | o 4: 6b3e11729672 C | |
|
47 | 47 | | |
|
48 | o 3: Z | |
|
48 | o 3: 57e70bad1ea3 Z | |
|
49 | 49 | | |
|
50 | | o 2: B | |
|
50 | | o 2: c1e6b162678d B | |
|
51 | 51 | |/ |
|
52 | o 1: A | |
|
52 | o 1: 21a6c4502885 A | |
|
53 | 53 | | |
|
54 | o 0: R | |
|
54 | o 0: b41ce7760717 R | |
|
55 | 55 | |
|
56 | 56 | Multiple branching points caused by selecting a single merge changeset: |
|
57 | 57 | |
|
58 | 58 | $ rebasewithdag -b E -d Z <<'EOS' |
|
59 | 59 | > E |
|
60 | 60 | > /| |
|
61 | 61 | > B C D # B, C: multiple branching points |
|
62 | 62 | > | |/ # D should not be picked |
|
63 | 63 | > Z | / |
|
64 | 64 | > \|/ |
|
65 | 65 | > A |
|
66 | 66 | > | |
|
67 | 67 | > R |
|
68 | 68 | > EOS |
|
69 | 69 | rebasing 2:c1e6b162678d "B" (B) |
|
70 | 70 | rebasing 3:d6003a550c2c "C" (C) |
|
71 | 71 | rebasing 6:54c8f00cb91c "E" (E tip) |
|
72 | o 6: E | |
|
72 | o 6: 00598421b616 E | |
|
73 | 73 | |\ |
|
74 | | o 5: C | |
|
74 | | o 5: 6b3e11729672 C | |
|
75 | 75 | | | |
|
76 | o | 4: B | |
|
76 | o | 4: 85260910e847 B | |
|
77 | 77 | |/ |
|
78 | o 3: Z | |
|
78 | o 3: 57e70bad1ea3 Z | |
|
79 | 79 | | |
|
80 | | o 2: D | |
|
80 | | o 2: 8924700906fe D | |
|
81 | 81 | |/ |
|
82 | o 1: A | |
|
82 | o 1: 21a6c4502885 A | |
|
83 | 83 | | |
|
84 | o 0: R | |
|
84 | o 0: b41ce7760717 R | |
|
85 | 85 | |
|
86 | 86 | Rebase should not extend the "--base" revset using "descendants": |
|
87 | 87 | |
|
88 | 88 | $ rebasewithdag -b B -d Z <<'EOS' |
|
89 | 89 | > E |
|
90 | 90 | > /| |
|
91 | 91 | > Z B C # descendants(B) = B+E. With E, C will be included incorrectly |
|
92 | 92 | > \|/ |
|
93 | 93 | > A |
|
94 | 94 | > | |
|
95 | 95 | > R |
|
96 | 96 | > EOS |
|
97 | 97 | rebasing 2:c1e6b162678d "B" (B) |
|
98 | 98 | rebasing 5:54c8f00cb91c "E" (E tip) |
|
99 | o 5: E | |
|
99 | o 5: e583bf3ff54c E | |
|
100 | 100 | |\ |
|
101 | | o 4: B | |
|
101 | | o 4: 85260910e847 B | |
|
102 | 102 | | | |
|
103 | | o 3: Z | |
|
103 | | o 3: 57e70bad1ea3 Z | |
|
104 | 104 | | | |
|
105 | o | 2: C | |
|
105 | o | 2: d6003a550c2c C | |
|
106 | 106 | |/ |
|
107 | o 1: A | |
|
107 | o 1: 21a6c4502885 A | |
|
108 | 108 | | |
|
109 | o 0: R | |
|
109 | o 0: b41ce7760717 R | |
|
110 | 110 | |
|
111 | 111 | Rebase should not simplify the "--base" revset using "roots": |
|
112 | 112 | |
|
113 | 113 | $ rebasewithdag -b B+E -d Z <<'EOS' |
|
114 | 114 | > E |
|
115 | 115 | > /| |
|
116 | 116 | > Z B C # roots(B+E) = B. Without E, C will be missed incorrectly |
|
117 | 117 | > \|/ |
|
118 | 118 | > A |
|
119 | 119 | > | |
|
120 | 120 | > R |
|
121 | 121 | > EOS |
|
122 | 122 | rebasing 2:c1e6b162678d "B" (B) |
|
123 | 123 | rebasing 3:d6003a550c2c "C" (C) |
|
124 | 124 | rebasing 5:54c8f00cb91c "E" (E tip) |
|
125 | o 5: E | |
|
125 | o 5: 00598421b616 E | |
|
126 | 126 | |\ |
|
127 | | o 4: C | |
|
127 | | o 4: 6b3e11729672 C | |
|
128 | 128 | | | |
|
129 | o | 3: B | |
|
129 | o | 3: 85260910e847 B | |
|
130 | 130 | |/ |
|
131 | o 2: Z | |
|
131 | o 2: 57e70bad1ea3 Z | |
|
132 | 132 | | |
|
133 | o 1: A | |
|
133 | o 1: 21a6c4502885 A | |
|
134 | 134 | | |
|
135 | o 0: R | |
|
135 | o 0: b41ce7760717 R | |
|
136 | 136 | |
|
137 | 137 | The destination is one of the two branching points of a merge: |
|
138 | 138 | |
|
139 | 139 | $ rebasewithdag -b F -d Z <<'EOS' |
|
140 | 140 | > F |
|
141 | 141 | > / \ |
|
142 | 142 | > E D |
|
143 | 143 | > / / |
|
144 | 144 | > Z C |
|
145 | 145 | > \ / |
|
146 | 146 | > B |
|
147 | 147 | > | |
|
148 | 148 | > A |
|
149 | 149 | > EOS |
|
150 | 150 | nothing to rebase |
|
151 | 151 | [1] |
|
152 | 152 | |
|
153 | 153 | Multiple branching points caused by multiple bases (issue5420): |
|
154 | 154 | |
|
155 | 155 | $ rebasewithdag -b E1+E2+C2+B1 -d Z <<'EOS' |
|
156 | 156 | > Z E2 |
|
157 | 157 | > | / |
|
158 | 158 | > F E1 C2 |
|
159 | 159 | > |/ / |
|
160 | 160 | > E C1 B2 |
|
161 | 161 | > |/ / |
|
162 | 162 | > C B1 |
|
163 | 163 | > |/ |
|
164 | 164 | > B |
|
165 | 165 | > | |
|
166 | 166 | > A |
|
167 | 167 | > | |
|
168 | 168 | > R |
|
169 | 169 | > EOS |
|
170 | 170 | rebasing 3:a113dbaa660a "B1" (B1) |
|
171 | 171 | rebasing 5:06ce7b1cc8c2 "B2" (B2) |
|
172 | 172 | rebasing 6:0ac98cce32d3 "C1" (C1) |
|
173 | 173 | rebasing 8:781512f5e33d "C2" (C2) |
|
174 | 174 | rebasing 9:428d8c18f641 "E1" (E1) |
|
175 | 175 | rebasing 11:e1bf82f6b6df "E2" (E2) |
|
176 | o 12: E2 | |
|
176 | o 12: e4a37b6fdbd2 E2 | |
|
177 | 177 | | |
|
178 | o 11: E1 | |
|
178 | o 11: 9675bea983df E1 | |
|
179 | 179 | | |
|
180 | | o 10: C2 | |
|
180 | | o 10: 4faf5d4c80dc C2 | |
|
181 | 181 | | | |
|
182 | | o 9: C1 | |
|
182 | | o 9: d4799b1ad57d C1 | |
|
183 | 183 | |/ |
|
184 | | o 8: B2 | |
|
184 | | o 8: 772732dc64d6 B2 | |
|
185 | 185 | | | |
|
186 | | o 7: B1 | |
|
186 | | o 7: ad3ac528a49f B1 | |
|
187 | 187 | |/ |
|
188 | o 6: Z | |
|
188 | o 6: 2cbdfca6b9d5 Z | |
|
189 | 189 | | |
|
190 | o 5: F | |
|
190 | o 5: fcdb3293ec13 F | |
|
191 | 191 | | |
|
192 | o 4: E | |
|
192 | o 4: a4652bb8ac54 E | |
|
193 | 193 | | |
|
194 | o 3: C | |
|
194 | o 3: bd5548558fcf C | |
|
195 | 195 | | |
|
196 | o 2: B | |
|
196 | o 2: c1e6b162678d B | |
|
197 | 197 | | |
|
198 | o 1: A | |
|
198 | o 1: 21a6c4502885 A | |
|
199 | 199 | | |
|
200 | o 0: R | |
|
200 | o 0: b41ce7760717 R | |
|
201 | 201 | |
|
202 | 202 | Multiple branching points with multiple merges: |
|
203 | 203 | |
|
204 | 204 | $ rebasewithdag -b G+P -d Z <<'EOS' |
|
205 | 205 | > G H P |
|
206 | 206 | > |\ /| |\ |
|
207 | 207 | > F E D M N |
|
208 | 208 | > \|/| /| |\ |
|
209 | 209 | > Z C B I J K L |
|
210 | 210 | > \|/ |/ |/ |
|
211 | 211 | > A A A |
|
212 | 212 | > EOS |
|
213 | 213 | rebasing 2:dc0947a82db8 "C" (C) |
|
214 | 214 | rebasing 8:4e4f9194f9f1 "D" (D) |
|
215 | 215 | rebasing 9:03ca77807e91 "E" (E) |
|
216 | 216 | rebasing 10:afc707c82df0 "F" (F) |
|
217 | 217 | rebasing 13:690dfff91e9e "G" (G) |
|
218 | 218 | rebasing 14:2893b886bb10 "H" (H) |
|
219 | 219 | rebasing 3:08ebfeb61bac "I" (I) |
|
220 | 220 | rebasing 4:a0a5005cec67 "J" (J) |
|
221 | 221 | rebasing 5:83780307a7e8 "K" (K) |
|
222 | 222 | rebasing 6:e131637a1cb6 "L" (L) |
|
223 | 223 | rebasing 11:d1f6d0c3c7e4 "M" (M) |
|
224 | 224 | rebasing 12:7aaec6f81888 "N" (N) |
|
225 | 225 | rebasing 15:325bc8f1760d "P" (P tip) |
|
226 | o 15: P | |
|
226 | o 15: 6ef6a0ea3b18 P | |
|
227 | 227 | |\ |
|
228 | | o 14: N | |
|
228 | | o 14: 20ba3610a7e5 N | |
|
229 | 229 | | |\ |
|
230 | o \ \ 13: M | |
|
230 | o \ \ 13: cd4f6c06d2ab M | |
|
231 | 231 | |\ \ \ |
|
232 | | | | o 12: L | |
|
232 | | | | o 12: bca872041455 L | |
|
233 | 233 | | | | | |
|
234 | | | o | 11: K | |
|
234 | | | o | 11: 7bbb6c8a6ad7 K | |
|
235 | 235 | | | |/ |
|
236 | | o / 10: J | |
|
236 | | o / 10: de0cbffe893e J | |
|
237 | 237 | | |/ |
|
238 | o / 9: I | |
|
238 | o / 9: 0e710f176a88 I | |
|
239 | 239 | |/ |
|
240 | | o 8: H | |
|
240 | | o 8: 52507bab39ca H | |
|
241 | 241 | | |\ |
|
242 | | | | o 7: G | |
|
242 | | | | o 7: bb5fe4652f0d G | |
|
243 | 243 | | | |/| |
|
244 | | | | o 6: F | |
|
244 | | | | o 6: f4ad4b31daf4 F | |
|
245 | 245 | | | | | |
|
246 | | | o | 5: E | |
|
246 | | | o | 5: b168f85f2e78 E | |
|
247 | 247 | | | |/ |
|
248 | | o | 4: D | |
|
248 | | o | 4: 8d09fcdb5594 D | |
|
249 | 249 | | |\| |
|
250 | +---o 3: C | |
|
250 | +---o 3: ab70b4c5a9c9 C | |
|
251 | 251 | | | |
|
252 | o | 2: Z | |
|
252 | o | 2: 262e37e34f63 Z | |
|
253 | 253 | | | |
|
254 | | o 1: B | |
|
254 | | o 1: 112478962961 B | |
|
255 | 255 | |/ |
|
256 | o 0: A | |
|
256 | o 0: 426bada5c675 A | |
|
257 | 257 | |
|
258 | 258 | Slightly more complex merge case (mentioned in https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/091074.html): |
|
259 | 259 | |
|
260 | 260 | $ rebasewithdag -b A3+B3 -d Z <<'EOF' |
|
261 | 261 | > Z C1 A3 B3 |
|
262 | 262 | > | / / \ / \ |
|
263 | 263 | > M3 C0 A1 A2 B1 B2 |
|
264 | 264 | > | / | | | | |
|
265 | 265 | > M2 M1 C1 C1 M3 |
|
266 | 266 | > | |
|
267 | 267 | > M1 |
|
268 | 268 | > | |
|
269 | 269 | > M0 |
|
270 | 270 | > EOF |
|
271 | 271 | rebasing 4:8817fae53c94 "C0" (C0) |
|
272 | 272 | rebasing 6:06ca5dfe3b5b "B2" (B2) |
|
273 | 273 | rebasing 7:73508237b032 "C1" (C1) |
|
274 | 274 | rebasing 9:fdb955e2faed "A2" (A2) |
|
275 | 275 | rebasing 11:4e449bd1a643 "A3" (A3) |
|
276 | 276 | rebasing 10:0a33b0519128 "B1" (B1) |
|
277 | 277 | rebasing 12:209327807c3a "B3" (B3 tip) |
|
278 | o 12: B3 | |
|
278 | o 12: ceb984566332 B3 | |
|
279 | 279 | |\ |
|
280 | | o 11: B1 | |
|
280 | | o 11: 19d93caac497 B1 | |
|
281 | 281 | | | |
|
282 | | | o 10: A3 | |
|
282 | | | o 10: 058e73d3916b A3 | |
|
283 | 283 | | | |\ |
|
284 | | +---o 9: A2 | |
|
284 | | +---o 9: 0ba13ad72234 A2 | |
|
285 | 285 | | | | |
|
286 | | o | 8: C1 | |
|
286 | | o | 8: c122c2af10c6 C1 | |
|
287 | 287 | | | | |
|
288 | o | | 7: B2 | |
|
288 | o | | 7: 74275896650e B2 | |
|
289 | 289 | | | | |
|
290 | | o | 6: C0 | |
|
290 | | o | 6: 455ba9bd3ea2 C0 | |
|
291 | 291 | |/ / |
|
292 | o | 5: Z | |
|
292 | o | 5: b3d7d2fda53b Z | |
|
293 | 293 | | | |
|
294 | o | 4: M3 | |
|
294 | o | 4: 182ab6383dd7 M3 | |
|
295 | 295 | | | |
|
296 | o | 3: M2 | |
|
296 | o | 3: 6c3f73563d5f M2 | |
|
297 | 297 | | | |
|
298 | | o 2: A1 | |
|
298 | | o 2: 88c860fffcc2 A1 | |
|
299 | 299 | |/ |
|
300 | o 1: M1 | |
|
300 | o 1: bc852baa85dd M1 | |
|
301 | 301 | | |
|
302 | o 0: M0 | |
|
302 | o 0: dbdfc5c9bcd5 M0 | |
|
303 | 303 | |
|
304 | 304 | Disconnected graph: |
|
305 | 305 | |
|
306 | 306 | $ rebasewithdag -b B -d Z <<'EOS' |
|
307 | 307 | > B |
|
308 | 308 | > | |
|
309 | 309 | > Z A |
|
310 | 310 | > EOS |
|
311 | 311 | nothing to rebase from 112478962961 to 48b9aae0607f |
|
312 | 312 | [1] |
|
313 | 313 | |
|
314 | 314 | Multiple roots. Roots are ancestors of dest: |
|
315 | 315 | |
|
316 | 316 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
317 | 317 | > D Z B |
|
318 | 318 | > \|\| |
|
319 | 319 | > C A |
|
320 | 320 | > EOF |
|
321 | 321 | rebasing 2:112478962961 "B" (B) |
|
322 | 322 | rebasing 3:b70f76719894 "D" (D) |
|
323 | o 4: D | |
|
323 | o 4: 511efad7bf13 D | |
|
324 | 324 | | |
|
325 | | o 3: B | |
|
325 | | o 3: 25c4e279af62 B | |
|
326 | 326 | |/ |
|
327 | o 2: Z | |
|
327 | o 2: 3a49f54d7bb1 Z | |
|
328 | 328 | |\ |
|
329 | | o 1: C | |
|
329 | | o 1: 96cc3511f894 C | |
|
330 | 330 | | |
|
331 | o 0: A | |
|
331 | o 0: 426bada5c675 A | |
|
332 | 332 | |
|
333 | 333 | Multiple roots. One root is not an ancestor of dest: |
|
334 | 334 | |
|
335 | 335 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
336 | 336 | > Z B D |
|
337 | 337 | > \|\| |
|
338 | 338 | > A C |
|
339 | 339 | > EOF |
|
340 | 340 | nothing to rebase from f675d5a1c6a4+b70f76719894 to 262e37e34f63 |
|
341 | 341 | [1] |
|
342 | 342 | |
|
343 | 343 | Multiple roots. One root is not an ancestor of dest. Select using a merge: |
|
344 | 344 | |
|
345 | 345 | $ rebasewithdag -b E -d Z <<'EOF' |
|
346 | 346 | > E |
|
347 | 347 | > |\ |
|
348 | 348 | > Z B D |
|
349 | 349 | > \|\| |
|
350 | 350 | > A C |
|
351 | 351 | > EOF |
|
352 | 352 | rebasing 2:f675d5a1c6a4 "B" (B) |
|
353 | 353 | rebasing 5:f68696fe6af8 "E" (E tip) |
|
354 | o 5: E | |
|
354 | o 5: f6e6f5081554 E | |
|
355 | 355 | |\ |
|
356 | | o 4: B | |
|
356 | | o 4: 30cabcba27be B | |
|
357 | 357 | | |\ |
|
358 | | | o 3: Z | |
|
358 | | | o 3: 262e37e34f63 Z | |
|
359 | 359 | | | | |
|
360 | o | | 2: D | |
|
360 | o | | 2: b70f76719894 D | |
|
361 | 361 | |/ / |
|
362 | o / 1: C | |
|
362 | o / 1: 96cc3511f894 C | |
|
363 | 363 | / |
|
364 | o 0: A | |
|
364 | o 0: 426bada5c675 A | |
|
365 | 365 | |
|
366 | 366 | Multiple roots. Two children share two parents while dest has only one parent: |
|
367 | 367 | |
|
368 | 368 | $ rebasewithdag -b B+D -d Z <<'EOF' |
|
369 | 369 | > Z B D |
|
370 | 370 | > \|\|\ |
|
371 | 371 | > A C A |
|
372 | 372 | > EOF |
|
373 | 373 | rebasing 2:f675d5a1c6a4 "B" (B) |
|
374 | 374 | rebasing 3:c2a779e13b56 "D" (D) |
|
375 | o 4: D | |
|
375 | o 4: 5eecd056b5f8 D | |
|
376 | 376 | |\ |
|
377 | +---o 3: B | |
|
377 | +---o 3: 30cabcba27be B | |
|
378 | 378 | | |/ |
|
379 | | o 2: Z | |
|
379 | | o 2: 262e37e34f63 Z | |
|
380 | 380 | | | |
|
381 | o | 1: C | |
|
381 | o | 1: 96cc3511f894 C | |
|
382 | 382 | / |
|
383 | o 0: A | |
|
383 | o 0: 426bada5c675 A | |
|
384 | 384 |
@@ -1,245 +1,245 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > drawdag=$TESTDIR/drawdag.py |
|
5 | 5 | > |
|
6 | 6 | > [phases] |
|
7 | 7 | > publish=False |
|
8 | 8 | > |
|
9 | 9 | > [alias] |
|
10 | > tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n" | |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' bookmarks: {bookmarks}\n" | |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | Create a repo with several bookmarks |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | |
|
17 | 17 | $ echo a > a |
|
18 | 18 | $ hg ci -Am A |
|
19 | 19 | adding a |
|
20 | 20 | |
|
21 | 21 | $ echo b > b |
|
22 | 22 | $ hg ci -Am B |
|
23 | 23 | adding b |
|
24 | 24 | $ hg book 'X' |
|
25 | 25 | $ hg book 'Y' |
|
26 | 26 | |
|
27 | 27 | $ echo c > c |
|
28 | 28 | $ hg ci -Am C |
|
29 | 29 | adding c |
|
30 | 30 | $ hg book 'Z' |
|
31 | 31 | |
|
32 | 32 | $ hg up -q 0 |
|
33 | 33 | |
|
34 | 34 | $ echo d > d |
|
35 | 35 | $ hg ci -Am D |
|
36 | 36 | adding d |
|
37 | 37 | created new head |
|
38 | 38 | |
|
39 | 39 | $ hg book W |
|
40 | 40 | |
|
41 | 41 | $ hg tglog |
|
42 | @ 3: 'D' bookmarks: W | |
|
42 | @ 3: 41acb9dca9eb 'D' bookmarks: W | |
|
43 | 43 | | |
|
44 | | o 2: 'C' bookmarks: Y Z | |
|
44 | | o 2: 49cb3485fa0c 'C' bookmarks: Y Z | |
|
45 | 45 | | | |
|
46 | | o 1: 'B' bookmarks: X | |
|
46 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
|
47 | 47 | |/ |
|
48 | o 0: 'A' bookmarks: | |
|
48 | o 0: 1994f17a630e 'A' bookmarks: | |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | Move only rebased bookmarks |
|
52 | 52 | |
|
53 | 53 | $ cd .. |
|
54 | 54 | $ hg clone -q a a1 |
|
55 | 55 | |
|
56 | 56 | $ cd a1 |
|
57 | 57 | $ hg up -q Z |
|
58 | 58 | |
|
59 | 59 | Test deleting divergent bookmarks from dest (issue3685) |
|
60 | 60 | |
|
61 | 61 | $ hg book -r 3 Z@diverge |
|
62 | 62 | |
|
63 | 63 | ... and also test that bookmarks not on dest or not being moved aren't deleted |
|
64 | 64 | |
|
65 | 65 | $ hg book -r 3 X@diverge |
|
66 | 66 | $ hg book -r 0 Y@diverge |
|
67 | 67 | |
|
68 | 68 | $ hg tglog |
|
69 | o 3: 'D' bookmarks: W X@diverge Z@diverge | |
|
69 | o 3: 41acb9dca9eb 'D' bookmarks: W X@diverge Z@diverge | |
|
70 | 70 | | |
|
71 | | @ 2: 'C' bookmarks: Y Z | |
|
71 | | @ 2: 49cb3485fa0c 'C' bookmarks: Y Z | |
|
72 | 72 | | | |
|
73 | | o 1: 'B' bookmarks: X | |
|
73 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
|
74 | 74 | |/ |
|
75 | o 0: 'A' bookmarks: Y@diverge | |
|
75 | o 0: 1994f17a630e 'A' bookmarks: Y@diverge | |
|
76 | 76 | |
|
77 | 77 | $ hg rebase -s Y -d 3 |
|
78 | 78 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
79 | 79 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/49cb3485fa0c-126f3e97-rebase.hg (glob) |
|
80 | 80 | |
|
81 | 81 | $ hg tglog |
|
82 | @ 3: 'C' bookmarks: Y Z | |
|
82 | @ 3: 17fb3faba63c 'C' bookmarks: Y Z | |
|
83 | 83 | | |
|
84 | o 2: 'D' bookmarks: W X@diverge | |
|
84 | o 2: 41acb9dca9eb 'D' bookmarks: W X@diverge | |
|
85 | 85 | | |
|
86 | | o 1: 'B' bookmarks: X | |
|
86 | | o 1: 6c81ed0049f8 'B' bookmarks: X | |
|
87 | 87 | |/ |
|
88 | o 0: 'A' bookmarks: Y@diverge | |
|
88 | o 0: 1994f17a630e 'A' bookmarks: Y@diverge | |
|
89 | 89 | |
|
90 | 90 | Do not try to keep active but deleted divergent bookmark |
|
91 | 91 | |
|
92 | 92 | $ cd .. |
|
93 | 93 | $ hg clone -q a a4 |
|
94 | 94 | |
|
95 | 95 | $ cd a4 |
|
96 | 96 | $ hg up -q 2 |
|
97 | 97 | $ hg book W@diverge |
|
98 | 98 | |
|
99 | 99 | $ hg rebase -s W -d . |
|
100 | 100 | rebasing 3:41acb9dca9eb "D" (W tip) |
|
101 | 101 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/41acb9dca9eb-b35a6a63-rebase.hg (glob) |
|
102 | 102 | |
|
103 | 103 | $ hg bookmarks |
|
104 | 104 | W 3:0d3554f74897 |
|
105 | 105 | X 1:6c81ed0049f8 |
|
106 | 106 | Y 2:49cb3485fa0c |
|
107 | 107 | Z 2:49cb3485fa0c |
|
108 | 108 | |
|
109 | 109 | Keep bookmarks to the correct rebased changeset |
|
110 | 110 | |
|
111 | 111 | $ cd .. |
|
112 | 112 | $ hg clone -q a a2 |
|
113 | 113 | |
|
114 | 114 | $ cd a2 |
|
115 | 115 | $ hg up -q Z |
|
116 | 116 | |
|
117 | 117 | $ hg rebase -s 1 -d 3 |
|
118 | 118 | rebasing 1:6c81ed0049f8 "B" (X) |
|
119 | 119 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
120 | 120 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) |
|
121 | 121 | |
|
122 | 122 | $ hg tglog |
|
123 | @ 3: 'C' bookmarks: Y Z | |
|
123 | @ 3: 3d5fa227f4b5 'C' bookmarks: Y Z | |
|
124 | 124 | | |
|
125 | o 2: 'B' bookmarks: X | |
|
125 | o 2: e926fccfa8ec 'B' bookmarks: X | |
|
126 | 126 | | |
|
127 | o 1: 'D' bookmarks: W | |
|
127 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
|
128 | 128 | | |
|
129 | o 0: 'A' bookmarks: | |
|
129 | o 0: 1994f17a630e 'A' bookmarks: | |
|
130 | 130 | |
|
131 | 131 | |
|
132 | 132 | Keep active bookmark on the correct changeset |
|
133 | 133 | |
|
134 | 134 | $ cd .. |
|
135 | 135 | $ hg clone -q a a3 |
|
136 | 136 | |
|
137 | 137 | $ cd a3 |
|
138 | 138 | $ hg up -q X |
|
139 | 139 | |
|
140 | 140 | $ hg rebase -d W |
|
141 | 141 | rebasing 1:6c81ed0049f8 "B" (X) |
|
142 | 142 | rebasing 2:49cb3485fa0c "C" (Y Z) |
|
143 | 143 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/6c81ed0049f8-a687065f-rebase.hg (glob) |
|
144 | 144 | |
|
145 | 145 | $ hg tglog |
|
146 | o 3: 'C' bookmarks: Y Z | |
|
146 | o 3: 3d5fa227f4b5 'C' bookmarks: Y Z | |
|
147 | 147 | | |
|
148 | @ 2: 'B' bookmarks: X | |
|
148 | @ 2: e926fccfa8ec 'B' bookmarks: X | |
|
149 | 149 | | |
|
150 | o 1: 'D' bookmarks: W | |
|
150 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
|
151 | 151 | | |
|
152 | o 0: 'A' bookmarks: | |
|
152 | o 0: 1994f17a630e 'A' bookmarks: | |
|
153 | 153 | |
|
154 | 154 | $ hg bookmarks |
|
155 | 155 | W 1:41acb9dca9eb |
|
156 | 156 | * X 2:e926fccfa8ec |
|
157 | 157 | Y 3:3d5fa227f4b5 |
|
158 | 158 | Z 3:3d5fa227f4b5 |
|
159 | 159 | |
|
160 | 160 | rebase --continue with bookmarks present (issue3802) |
|
161 | 161 | |
|
162 | 162 | $ hg up 2 |
|
163 | 163 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
164 | 164 | (leaving bookmark X) |
|
165 | 165 | $ echo 'C' > c |
|
166 | 166 | $ hg add c |
|
167 | 167 | $ hg ci -m 'other C' |
|
168 | 168 | created new head |
|
169 | 169 | $ hg up 3 |
|
170 | 170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
171 | 171 | $ hg rebase --dest 4 |
|
172 | 172 | rebasing 3:3d5fa227f4b5 "C" (Y Z) |
|
173 | 173 | merging c |
|
174 | 174 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
175 | 175 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
176 | 176 | [1] |
|
177 | 177 | $ echo 'c' > c |
|
178 | 178 | $ hg resolve --mark c |
|
179 | 179 | (no more unresolved files) |
|
180 | 180 | continue: hg rebase --continue |
|
181 | 181 | $ hg rebase --continue |
|
182 | 182 | rebasing 3:3d5fa227f4b5 "C" (Y Z) |
|
183 | 183 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/3d5fa227f4b5-c6ea2371-rebase.hg (glob) |
|
184 | 184 | $ hg tglog |
|
185 | @ 4: 'C' bookmarks: Y Z | |
|
185 | @ 4: 45c0f0ec1203 'C' bookmarks: Y Z | |
|
186 | 186 | | |
|
187 | o 3: 'other C' bookmarks: | |
|
187 | o 3: b0e10b7175fd 'other C' bookmarks: | |
|
188 | 188 | | |
|
189 | o 2: 'B' bookmarks: X | |
|
189 | o 2: e926fccfa8ec 'B' bookmarks: X | |
|
190 | 190 | | |
|
191 | o 1: 'D' bookmarks: W | |
|
191 | o 1: 41acb9dca9eb 'D' bookmarks: W | |
|
192 | 192 | | |
|
193 | o 0: 'A' bookmarks: | |
|
193 | o 0: 1994f17a630e 'A' bookmarks: | |
|
194 | 194 | |
|
195 | 195 | |
|
196 | 196 | ensure that bookmarks given the names of revset functions can be used |
|
197 | 197 | as --rev arguments (issue3950) |
|
198 | 198 | |
|
199 | 199 | $ hg update -q 3 |
|
200 | 200 | $ echo bimble > bimble |
|
201 | 201 | $ hg add bimble |
|
202 | 202 | $ hg commit -q -m 'bisect' |
|
203 | 203 | $ echo e >> bimble |
|
204 | 204 | $ hg ci -m bisect2 |
|
205 | 205 | $ echo e >> bimble |
|
206 | 206 | $ hg ci -m bisect3 |
|
207 | 207 | $ hg book bisect |
|
208 | 208 | $ hg update -q Y |
|
209 | 209 | $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z |
|
210 | 210 | rebasing 5:345c90f326a4 "bisect" |
|
211 | 211 | rebasing 6:f677a2907404 "bisect2" |
|
212 | 212 | rebasing 7:325c16001345 "bisect3" (bisect tip) |
|
213 | 213 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-b4840586-rebase.hg (glob) |
|
214 | 214 | |
|
215 | 215 | Bookmark and working parent get moved even if --keep is set (issue5682) |
|
216 | 216 | |
|
217 | 217 | $ hg init $TESTTMP/book-keep |
|
218 | 218 | $ cd $TESTTMP/book-keep |
|
219 | 219 | $ hg debugdrawdag <<'EOS' |
|
220 | 220 | > B C |
|
221 | 221 | > |/ |
|
222 | 222 | > A |
|
223 | 223 | > EOS |
|
224 | 224 | $ eval `hg tags -T 'hg bookmark -ir {node} {tag};\n' | grep -v tip` |
|
225 | 225 | $ rm .hg/localtags |
|
226 | 226 | $ hg up -q B |
|
227 | 227 | $ hg tglog |
|
228 | o 2: 'C' bookmarks: C | |
|
228 | o 2: dc0947a82db8 'C' bookmarks: C | |
|
229 | 229 | | |
|
230 | | @ 1: 'B' bookmarks: B | |
|
230 | | @ 1: 112478962961 'B' bookmarks: B | |
|
231 | 231 | |/ |
|
232 | o 0: 'A' bookmarks: A | |
|
232 | o 0: 426bada5c675 'A' bookmarks: A | |
|
233 | 233 | |
|
234 | 234 | $ hg rebase -r B -d C --keep |
|
235 | 235 | rebasing 1:112478962961 "B" (B) |
|
236 | 236 | $ hg tglog |
|
237 | @ 3: 'B' bookmarks: B | |
|
237 | @ 3: 9769fc65c4c5 'B' bookmarks: B | |
|
238 | 238 | | |
|
239 | o 2: 'C' bookmarks: C | |
|
239 | o 2: dc0947a82db8 'C' bookmarks: C | |
|
240 | 240 | | |
|
241 | | o 1: 'B' bookmarks: | |
|
241 | | o 1: 112478962961 'B' bookmarks: | |
|
242 | 242 | |/ |
|
243 | o 0: 'A' bookmarks: A | |
|
243 | o 0: 426bada5c675 'A' bookmarks: A | |
|
244 | 244 | |
|
245 | 245 |
@@ -1,857 +1,857 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > mq= |
|
5 | 5 | > |
|
6 | 6 | > [phases] |
|
7 | 7 | > publish=False |
|
8 | 8 | > |
|
9 | 9 | > [alias] |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
11 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
11 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" | |
|
12 | 12 | > EOF |
|
13 | 13 | |
|
14 | 14 | Create repo a: |
|
15 | 15 | |
|
16 | 16 | $ hg init a |
|
17 | 17 | $ cd a |
|
18 | 18 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
19 | 19 | adding changesets |
|
20 | 20 | adding manifests |
|
21 | 21 | adding file changes |
|
22 | 22 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
23 | 23 | new changesets cd010b8cd998:02de42196ebe |
|
24 | 24 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
25 | 25 | $ hg up tip |
|
26 | 26 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | |
|
28 | 28 | $ hg tglog |
|
29 | @ 7: 'H' | |
|
29 | @ 7: 02de42196ebe 'H' | |
|
30 | 30 | | |
|
31 | | o 6: 'G' | |
|
31 | | o 6: eea13746799a 'G' | |
|
32 | 32 | |/| |
|
33 | o | 5: 'F' | |
|
33 | o | 5: 24b6387c8c8c 'F' | |
|
34 | 34 | | | |
|
35 | | o 4: 'E' | |
|
35 | | o 4: 9520eea781bc 'E' | |
|
36 | 36 | |/ |
|
37 | | o 3: 'D' | |
|
37 | | o 3: 32af7686d403 'D' | |
|
38 | 38 | | | |
|
39 | | o 2: 'C' | |
|
39 | | o 2: 5fddd98957c8 'C' | |
|
40 | 40 | | | |
|
41 | | o 1: 'B' | |
|
41 | | o 1: 42ccdea3bb16 'B' | |
|
42 | 42 | |/ |
|
43 | o 0: 'A' | |
|
43 | o 0: cd010b8cd998 'A' | |
|
44 | 44 | |
|
45 | 45 | $ cd .. |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | Rebasing B onto H and collapsing changesets with different phases: |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | $ hg clone -q -u 3 a a1 |
|
52 | 52 | $ cd a1 |
|
53 | 53 | |
|
54 | 54 | $ hg phase --force --secret 3 |
|
55 | 55 | |
|
56 | 56 | $ cat > $TESTTMP/editor.sh <<EOF |
|
57 | 57 | > echo "==== before editing" |
|
58 | 58 | > cat \$1 |
|
59 | 59 | > echo "====" |
|
60 | 60 | > echo "edited manually" >> \$1 |
|
61 | 61 | > EOF |
|
62 | 62 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7 |
|
63 | 63 | rebasing 1:42ccdea3bb16 "B" |
|
64 | 64 | rebasing 2:5fddd98957c8 "C" |
|
65 | 65 | rebasing 3:32af7686d403 "D" |
|
66 | 66 | ==== before editing |
|
67 | 67 | Collapsed revision |
|
68 | 68 | * B |
|
69 | 69 | * C |
|
70 | 70 | * D |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
74 | 74 | HG: Leave message empty to abort commit. |
|
75 | 75 | HG: -- |
|
76 | 76 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
77 | 77 | HG: branch 'default' |
|
78 | 78 | HG: added B |
|
79 | 79 | HG: added C |
|
80 | 80 | HG: added D |
|
81 | 81 | ==== |
|
82 | 82 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
83 | 83 | |
|
84 | 84 | $ hg tglogp |
|
85 | @ 5:secret 'Collapsed revision | |
|
85 | @ 5: 30882080ba93 secret 'Collapsed revision | |
|
86 | 86 | | * B |
|
87 | 87 | | * C |
|
88 | 88 | | * D |
|
89 | 89 | | |
|
90 | 90 | | |
|
91 | 91 | | edited manually' |
|
92 | o 4:draft 'H' | |
|
92 | o 4: 02de42196ebe draft 'H' | |
|
93 | 93 | | |
|
94 | | o 3:draft 'G' | |
|
94 | | o 3: eea13746799a draft 'G' | |
|
95 | 95 | |/| |
|
96 | o | 2:draft 'F' | |
|
96 | o | 2: 24b6387c8c8c draft 'F' | |
|
97 | 97 | | | |
|
98 | | o 1:draft 'E' | |
|
98 | | o 1: 9520eea781bc draft 'E' | |
|
99 | 99 | |/ |
|
100 | o 0:draft 'A' | |
|
100 | o 0: cd010b8cd998 draft 'A' | |
|
101 | 101 | |
|
102 | 102 | $ hg manifest --rev tip |
|
103 | 103 | A |
|
104 | 104 | B |
|
105 | 105 | C |
|
106 | 106 | D |
|
107 | 107 | F |
|
108 | 108 | H |
|
109 | 109 | |
|
110 | 110 | $ cd .. |
|
111 | 111 | |
|
112 | 112 | |
|
113 | 113 | Rebasing E onto H: |
|
114 | 114 | |
|
115 | 115 | $ hg clone -q -u . a a2 |
|
116 | 116 | $ cd a2 |
|
117 | 117 | |
|
118 | 118 | $ hg phase --force --secret 6 |
|
119 | 119 | $ hg rebase --source 4 --collapse --dest 7 |
|
120 | 120 | rebasing 4:9520eea781bc "E" |
|
121 | 121 | rebasing 6:eea13746799a "G" |
|
122 | 122 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
123 | 123 | |
|
124 | 124 | $ hg tglog |
|
125 | o 6: 'Collapsed revision | |
|
125 | o 6: 7dd333a2d1e4 'Collapsed revision | |
|
126 | 126 | | * E |
|
127 | 127 | | * G' |
|
128 | @ 5: 'H' | |
|
128 | @ 5: 02de42196ebe 'H' | |
|
129 | 129 | | |
|
130 | o 4: 'F' | |
|
130 | o 4: 24b6387c8c8c 'F' | |
|
131 | 131 | | |
|
132 | | o 3: 'D' | |
|
132 | | o 3: 32af7686d403 'D' | |
|
133 | 133 | | | |
|
134 | | o 2: 'C' | |
|
134 | | o 2: 5fddd98957c8 'C' | |
|
135 | 135 | | | |
|
136 | | o 1: 'B' | |
|
136 | | o 1: 42ccdea3bb16 'B' | |
|
137 | 137 | |/ |
|
138 | o 0: 'A' | |
|
138 | o 0: cd010b8cd998 'A' | |
|
139 | 139 | |
|
140 | 140 | $ hg manifest --rev tip |
|
141 | 141 | A |
|
142 | 142 | E |
|
143 | 143 | F |
|
144 | 144 | H |
|
145 | 145 | |
|
146 | 146 | $ cd .. |
|
147 | 147 | |
|
148 | 148 | Rebasing G onto H with custom message: |
|
149 | 149 | |
|
150 | 150 | $ hg clone -q -u . a a3 |
|
151 | 151 | $ cd a3 |
|
152 | 152 | |
|
153 | 153 | $ hg rebase --base 6 -m 'custom message' |
|
154 | 154 | abort: message can only be specified with collapse |
|
155 | 155 | [255] |
|
156 | 156 | |
|
157 | 157 | $ cat > $TESTTMP/checkeditform.sh <<EOF |
|
158 | 158 | > env | grep HGEDITFORM |
|
159 | 159 | > true |
|
160 | 160 | > EOF |
|
161 | 161 | $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7 |
|
162 | 162 | rebasing 4:9520eea781bc "E" |
|
163 | 163 | rebasing 6:eea13746799a "G" |
|
164 | 164 | HGEDITFORM=rebase.collapse |
|
165 | 165 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
166 | 166 | |
|
167 | 167 | $ hg tglog |
|
168 | o 6: 'custom message' | |
|
168 | o 6: 38ed6a6b026b 'custom message' | |
|
169 | 169 | | |
|
170 | @ 5: 'H' | |
|
170 | @ 5: 02de42196ebe 'H' | |
|
171 | 171 | | |
|
172 | o 4: 'F' | |
|
172 | o 4: 24b6387c8c8c 'F' | |
|
173 | 173 | | |
|
174 | | o 3: 'D' | |
|
174 | | o 3: 32af7686d403 'D' | |
|
175 | 175 | | | |
|
176 | | o 2: 'C' | |
|
176 | | o 2: 5fddd98957c8 'C' | |
|
177 | 177 | | | |
|
178 | | o 1: 'B' | |
|
178 | | o 1: 42ccdea3bb16 'B' | |
|
179 | 179 | |/ |
|
180 | o 0: 'A' | |
|
180 | o 0: cd010b8cd998 'A' | |
|
181 | 181 | |
|
182 | 182 | $ hg manifest --rev tip |
|
183 | 183 | A |
|
184 | 184 | E |
|
185 | 185 | F |
|
186 | 186 | H |
|
187 | 187 | |
|
188 | 188 | $ cd .. |
|
189 | 189 | |
|
190 | 190 | Create repo b: |
|
191 | 191 | |
|
192 | 192 | $ hg init b |
|
193 | 193 | $ cd b |
|
194 | 194 | |
|
195 | 195 | $ echo A > A |
|
196 | 196 | $ hg ci -Am A |
|
197 | 197 | adding A |
|
198 | 198 | $ echo B > B |
|
199 | 199 | $ hg ci -Am B |
|
200 | 200 | adding B |
|
201 | 201 | |
|
202 | 202 | $ hg up -q 0 |
|
203 | 203 | |
|
204 | 204 | $ echo C > C |
|
205 | 205 | $ hg ci -Am C |
|
206 | 206 | adding C |
|
207 | 207 | created new head |
|
208 | 208 | |
|
209 | 209 | $ hg merge |
|
210 | 210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 211 | (branch merge, don't forget to commit) |
|
212 | 212 | |
|
213 | 213 | $ echo D > D |
|
214 | 214 | $ hg ci -Am D |
|
215 | 215 | adding D |
|
216 | 216 | |
|
217 | 217 | $ hg up -q 1 |
|
218 | 218 | |
|
219 | 219 | $ echo E > E |
|
220 | 220 | $ hg ci -Am E |
|
221 | 221 | adding E |
|
222 | 222 | created new head |
|
223 | 223 | |
|
224 | 224 | $ echo F > F |
|
225 | 225 | $ hg ci -Am F |
|
226 | 226 | adding F |
|
227 | 227 | |
|
228 | 228 | $ hg merge |
|
229 | 229 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 230 | (branch merge, don't forget to commit) |
|
231 | 231 | $ hg ci -m G |
|
232 | 232 | |
|
233 | 233 | $ hg up -q 0 |
|
234 | 234 | |
|
235 | 235 | $ echo H > H |
|
236 | 236 | $ hg ci -Am H |
|
237 | 237 | adding H |
|
238 | 238 | created new head |
|
239 | 239 | |
|
240 | 240 | $ hg tglog |
|
241 | @ 7: 'H' | |
|
241 | @ 7: c65502d41787 'H' | |
|
242 | 242 | | |
|
243 | | o 6: 'G' | |
|
243 | | o 6: c772a8b2dc17 'G' | |
|
244 | 244 | | |\ |
|
245 | | | o 5: 'F' | |
|
245 | | | o 5: 7f219660301f 'F' | |
|
246 | 246 | | | | |
|
247 | | | o 4: 'E' | |
|
247 | | | o 4: 8a5212ebc852 'E' | |
|
248 | 248 | | | | |
|
249 | | o | 3: 'D' | |
|
249 | | o | 3: 2870ad076e54 'D' | |
|
250 | 250 | | |\| |
|
251 | | o | 2: 'C' | |
|
251 | | o | 2: c5cefa58fd55 'C' | |
|
252 | 252 | |/ / |
|
253 | | o 1: 'B' | |
|
253 | | o 1: 27547f69f254 'B' | |
|
254 | 254 | |/ |
|
255 | o 0: 'A' | |
|
255 | o 0: 4a2df7238c3b 'A' | |
|
256 | 256 | |
|
257 | 257 | $ cd .. |
|
258 | 258 | |
|
259 | 259 | |
|
260 | 260 | Rebase and collapse - more than one external (fail): |
|
261 | 261 | |
|
262 | 262 | $ hg clone -q -u . b b1 |
|
263 | 263 | $ cd b1 |
|
264 | 264 | |
|
265 | 265 | $ hg rebase -s 2 --dest 7 --collapse |
|
266 | 266 | abort: unable to collapse on top of 7, there is more than one external parent: 1, 5 |
|
267 | 267 | [255] |
|
268 | 268 | |
|
269 | 269 | Rebase and collapse - E onto H: |
|
270 | 270 | |
|
271 | 271 | $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge |
|
272 | 272 | rebasing 4:8a5212ebc852 "E" |
|
273 | 273 | rebasing 5:7f219660301f "F" |
|
274 | 274 | rebasing 6:c772a8b2dc17 "G" |
|
275 | 275 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg (glob) |
|
276 | 276 | |
|
277 | 277 | $ hg tglog |
|
278 | o 5: 'Collapsed revision | |
|
278 | o 5: f97c4725bd99 'Collapsed revision | |
|
279 | 279 | |\ * E |
|
280 | 280 | | | * F |
|
281 | 281 | | | * G' |
|
282 | | @ 4: 'H' | |
|
282 | | @ 4: c65502d41787 'H' | |
|
283 | 283 | | | |
|
284 | o | 3: 'D' | |
|
284 | o | 3: 2870ad076e54 'D' | |
|
285 | 285 | |\ \ |
|
286 | | o | 2: 'C' | |
|
286 | | o | 2: c5cefa58fd55 'C' | |
|
287 | 287 | | |/ |
|
288 | o / 1: 'B' | |
|
288 | o / 1: 27547f69f254 'B' | |
|
289 | 289 | |/ |
|
290 | o 0: 'A' | |
|
290 | o 0: 4a2df7238c3b 'A' | |
|
291 | 291 | |
|
292 | 292 | $ hg manifest --rev tip |
|
293 | 293 | A |
|
294 | 294 | C |
|
295 | 295 | D |
|
296 | 296 | E |
|
297 | 297 | F |
|
298 | 298 | H |
|
299 | 299 | |
|
300 | 300 | $ cd .. |
|
301 | 301 | |
|
302 | 302 | |
|
303 | 303 | |
|
304 | 304 | |
|
305 | 305 | Test that branchheads cache is updated correctly when doing a strip in which |
|
306 | 306 | the parent of the ancestor node to be stripped does not become a head and also, |
|
307 | 307 | the parent of a node that is a child of the node stripped becomes a head (node |
|
308 | 308 | 3). The code is now much simpler and we could just test a simpler scenario |
|
309 | 309 | We keep it the test this way in case new complexity is injected. |
|
310 | 310 | |
|
311 | 311 | $ hg clone -q -u . b b2 |
|
312 | 312 | $ cd b2 |
|
313 | 313 | |
|
314 | 314 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
315 | 315 | 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
316 | 316 | 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default |
|
317 | 317 | |
|
318 | 318 | $ cat $TESTTMP/b2/.hg/cache/branch2-served |
|
319 | 319 | c65502d4178782309ce0574c5ae6ee9485a9bafa 7 |
|
320 | 320 | c772a8b2dc17629cec88a19d09c926c4814b12c7 o default |
|
321 | 321 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default |
|
322 | 322 | |
|
323 | 323 | $ hg strip 4 |
|
324 | 324 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg (glob) |
|
325 | 325 | |
|
326 | 326 | $ cat $TESTTMP/b2/.hg/cache/branch2-served |
|
327 | 327 | c65502d4178782309ce0574c5ae6ee9485a9bafa 4 |
|
328 | 328 | 2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default |
|
329 | 329 | c65502d4178782309ce0574c5ae6ee9485a9bafa o default |
|
330 | 330 | |
|
331 | 331 | $ hg heads --template="{rev}:{node} {branch}\n" |
|
332 | 332 | 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default |
|
333 | 333 | 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default |
|
334 | 334 | |
|
335 | 335 | $ cd .. |
|
336 | 336 | |
|
337 | 337 | |
|
338 | 338 | |
|
339 | 339 | |
|
340 | 340 | |
|
341 | 341 | |
|
342 | 342 | Create repo c: |
|
343 | 343 | |
|
344 | 344 | $ hg init c |
|
345 | 345 | $ cd c |
|
346 | 346 | |
|
347 | 347 | $ echo A > A |
|
348 | 348 | $ hg ci -Am A |
|
349 | 349 | adding A |
|
350 | 350 | $ echo B > B |
|
351 | 351 | $ hg ci -Am B |
|
352 | 352 | adding B |
|
353 | 353 | |
|
354 | 354 | $ hg up -q 0 |
|
355 | 355 | |
|
356 | 356 | $ echo C > C |
|
357 | 357 | $ hg ci -Am C |
|
358 | 358 | adding C |
|
359 | 359 | created new head |
|
360 | 360 | |
|
361 | 361 | $ hg merge |
|
362 | 362 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 363 | (branch merge, don't forget to commit) |
|
364 | 364 | |
|
365 | 365 | $ echo D > D |
|
366 | 366 | $ hg ci -Am D |
|
367 | 367 | adding D |
|
368 | 368 | |
|
369 | 369 | $ hg up -q 1 |
|
370 | 370 | |
|
371 | 371 | $ echo E > E |
|
372 | 372 | $ hg ci -Am E |
|
373 | 373 | adding E |
|
374 | 374 | created new head |
|
375 | 375 | $ echo F > E |
|
376 | 376 | $ hg ci -m 'F' |
|
377 | 377 | |
|
378 | 378 | $ echo G > G |
|
379 | 379 | $ hg ci -Am G |
|
380 | 380 | adding G |
|
381 | 381 | |
|
382 | 382 | $ hg merge |
|
383 | 383 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
384 | 384 | (branch merge, don't forget to commit) |
|
385 | 385 | |
|
386 | 386 | $ hg ci -m H |
|
387 | 387 | |
|
388 | 388 | $ hg up -q 0 |
|
389 | 389 | |
|
390 | 390 | $ echo I > I |
|
391 | 391 | $ hg ci -Am I |
|
392 | 392 | adding I |
|
393 | 393 | created new head |
|
394 | 394 | |
|
395 | 395 | $ hg tglog |
|
396 | @ 8: 'I' | |
|
396 | @ 8: 46d6f0e29c20 'I' | |
|
397 | 397 | | |
|
398 | | o 7: 'H' | |
|
398 | | o 7: 417d3b648079 'H' | |
|
399 | 399 | | |\ |
|
400 | | | o 6: 'G' | |
|
400 | | | o 6: 55a44ad28289 'G' | |
|
401 | 401 | | | | |
|
402 | | | o 5: 'F' | |
|
402 | | | o 5: dca5924bb570 'F' | |
|
403 | 403 | | | | |
|
404 | | | o 4: 'E' | |
|
404 | | | o 4: 8a5212ebc852 'E' | |
|
405 | 405 | | | | |
|
406 | | o | 3: 'D' | |
|
406 | | o | 3: 2870ad076e54 'D' | |
|
407 | 407 | | |\| |
|
408 | | o | 2: 'C' | |
|
408 | | o | 2: c5cefa58fd55 'C' | |
|
409 | 409 | |/ / |
|
410 | | o 1: 'B' | |
|
410 | | o 1: 27547f69f254 'B' | |
|
411 | 411 | |/ |
|
412 | o 0: 'A' | |
|
412 | o 0: 4a2df7238c3b 'A' | |
|
413 | 413 | |
|
414 | 414 | $ cd .. |
|
415 | 415 | |
|
416 | 416 | |
|
417 | 417 | Rebase and collapse - E onto I: |
|
418 | 418 | |
|
419 | 419 | $ hg clone -q -u . c c1 |
|
420 | 420 | $ cd c1 |
|
421 | 421 | |
|
422 | 422 | $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge |
|
423 | 423 | rebasing 4:8a5212ebc852 "E" |
|
424 | 424 | rebasing 5:dca5924bb570 "F" |
|
425 | 425 | merging E |
|
426 | 426 | rebasing 6:55a44ad28289 "G" |
|
427 | 427 | rebasing 7:417d3b648079 "H" |
|
428 | 428 | saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg (glob) |
|
429 | 429 | |
|
430 | 430 | $ hg tglog |
|
431 | o 5: 'Collapsed revision | |
|
431 | o 5: 340b34a63b39 'Collapsed revision | |
|
432 | 432 | |\ * E |
|
433 | 433 | | | * F |
|
434 | 434 | | | * G |
|
435 | 435 | | | * H' |
|
436 | | @ 4: 'I' | |
|
436 | | @ 4: 46d6f0e29c20 'I' | |
|
437 | 437 | | | |
|
438 | o | 3: 'D' | |
|
438 | o | 3: 2870ad076e54 'D' | |
|
439 | 439 | |\ \ |
|
440 | | o | 2: 'C' | |
|
440 | | o | 2: c5cefa58fd55 'C' | |
|
441 | 441 | | |/ |
|
442 | o / 1: 'B' | |
|
442 | o / 1: 27547f69f254 'B' | |
|
443 | 443 | |/ |
|
444 | o 0: 'A' | |
|
444 | o 0: 4a2df7238c3b 'A' | |
|
445 | 445 | |
|
446 | 446 | $ hg manifest --rev tip |
|
447 | 447 | A |
|
448 | 448 | C |
|
449 | 449 | D |
|
450 | 450 | E |
|
451 | 451 | G |
|
452 | 452 | I |
|
453 | 453 | |
|
454 | 454 | $ hg up tip -q |
|
455 | 455 | $ cat E |
|
456 | 456 | F |
|
457 | 457 | |
|
458 | 458 | $ cd .. |
|
459 | 459 | |
|
460 | 460 | |
|
461 | 461 | Create repo d: |
|
462 | 462 | |
|
463 | 463 | $ hg init d |
|
464 | 464 | $ cd d |
|
465 | 465 | |
|
466 | 466 | $ echo A > A |
|
467 | 467 | $ hg ci -Am A |
|
468 | 468 | adding A |
|
469 | 469 | $ echo B > B |
|
470 | 470 | $ hg ci -Am B |
|
471 | 471 | adding B |
|
472 | 472 | $ echo C > C |
|
473 | 473 | $ hg ci -Am C |
|
474 | 474 | adding C |
|
475 | 475 | |
|
476 | 476 | $ hg up -q 1 |
|
477 | 477 | |
|
478 | 478 | $ echo D > D |
|
479 | 479 | $ hg ci -Am D |
|
480 | 480 | adding D |
|
481 | 481 | created new head |
|
482 | 482 | $ hg merge |
|
483 | 483 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
484 | 484 | (branch merge, don't forget to commit) |
|
485 | 485 | |
|
486 | 486 | $ hg ci -m E |
|
487 | 487 | |
|
488 | 488 | $ hg up -q 0 |
|
489 | 489 | |
|
490 | 490 | $ echo F > F |
|
491 | 491 | $ hg ci -Am F |
|
492 | 492 | adding F |
|
493 | 493 | created new head |
|
494 | 494 | |
|
495 | 495 | $ hg tglog |
|
496 | @ 5: 'F' | |
|
496 | @ 5: c137c2b8081f 'F' | |
|
497 | 497 | | |
|
498 | | o 4: 'E' | |
|
498 | | o 4: 0a42590ed746 'E' | |
|
499 | 499 | | |\ |
|
500 | | | o 3: 'D' | |
|
500 | | | o 3: 7bbcd6078bcc 'D' | |
|
501 | 501 | | | | |
|
502 | | o | 2: 'C' | |
|
502 | | o | 2: f838bfaca5c7 'C' | |
|
503 | 503 | | |/ |
|
504 | | o 1: 'B' | |
|
504 | | o 1: 27547f69f254 'B' | |
|
505 | 505 | |/ |
|
506 | o 0: 'A' | |
|
506 | o 0: 4a2df7238c3b 'A' | |
|
507 | 507 | |
|
508 | 508 | $ cd .. |
|
509 | 509 | |
|
510 | 510 | |
|
511 | 511 | Rebase and collapse - B onto F: |
|
512 | 512 | |
|
513 | 513 | $ hg clone -q -u . d d1 |
|
514 | 514 | $ cd d1 |
|
515 | 515 | |
|
516 | 516 | $ hg rebase -s 1 --collapse --dest 5 |
|
517 | 517 | rebasing 1:27547f69f254 "B" |
|
518 | 518 | rebasing 2:f838bfaca5c7 "C" |
|
519 | 519 | rebasing 3:7bbcd6078bcc "D" |
|
520 | 520 | rebasing 4:0a42590ed746 "E" |
|
521 | 521 | saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg (glob) |
|
522 | 522 | |
|
523 | 523 | $ hg tglog |
|
524 | o 2: 'Collapsed revision | |
|
524 | o 2: b72eaccb283f 'Collapsed revision | |
|
525 | 525 | | * B |
|
526 | 526 | | * C |
|
527 | 527 | | * D |
|
528 | 528 | | * E' |
|
529 | @ 1: 'F' | |
|
529 | @ 1: c137c2b8081f 'F' | |
|
530 | 530 | | |
|
531 | o 0: 'A' | |
|
531 | o 0: 4a2df7238c3b 'A' | |
|
532 | 532 | |
|
533 | 533 | $ hg manifest --rev tip |
|
534 | 534 | A |
|
535 | 535 | B |
|
536 | 536 | C |
|
537 | 537 | D |
|
538 | 538 | F |
|
539 | 539 | |
|
540 | 540 | Interactions between collapse and keepbranches |
|
541 | 541 | $ cd .. |
|
542 | 542 | $ hg init e |
|
543 | 543 | $ cd e |
|
544 | 544 | $ echo 'a' > a |
|
545 | 545 | $ hg ci -Am 'A' |
|
546 | 546 | adding a |
|
547 | 547 | |
|
548 | 548 | $ hg branch 'one' |
|
549 | 549 | marked working directory as branch one |
|
550 | 550 | (branches are permanent and global, did you want a bookmark?) |
|
551 | 551 | $ echo 'b' > b |
|
552 | 552 | $ hg ci -Am 'B' |
|
553 | 553 | adding b |
|
554 | 554 | |
|
555 | 555 | $ hg branch 'two' |
|
556 | 556 | marked working directory as branch two |
|
557 | 557 | $ echo 'c' > c |
|
558 | 558 | $ hg ci -Am 'C' |
|
559 | 559 | adding c |
|
560 | 560 | |
|
561 | 561 | $ hg up -q 0 |
|
562 | 562 | $ echo 'd' > d |
|
563 | 563 | $ hg ci -Am 'D' |
|
564 | 564 | adding d |
|
565 | 565 | |
|
566 | 566 | $ hg tglog |
|
567 | @ 3: 'D' | |
|
567 | @ 3: 41acb9dca9eb 'D' | |
|
568 | 568 | | |
|
569 | | o 2: 'C' two | |
|
569 | | o 2: 8ac4a08debf1 'C' two | |
|
570 | 570 | | | |
|
571 | | o 1: 'B' one | |
|
571 | | o 1: 1ba175478953 'B' one | |
|
572 | 572 | |/ |
|
573 | o 0: 'A' | |
|
573 | o 0: 1994f17a630e 'A' | |
|
574 | 574 | |
|
575 | 575 | $ hg rebase --keepbranches --collapse -s 1 -d 3 |
|
576 | 576 | abort: cannot collapse multiple named branches |
|
577 | 577 | [255] |
|
578 | 578 | |
|
579 | 579 | $ repeatchange() { |
|
580 | 580 | > hg checkout $1 |
|
581 | 581 | > hg cp d z |
|
582 | 582 | > echo blah >> z |
|
583 | 583 | > hg commit -Am "$2" --user "$3" |
|
584 | 584 | > } |
|
585 | 585 | $ repeatchange 3 "E" "user1" |
|
586 | 586 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
587 | 587 | $ repeatchange 3 "E" "user2" |
|
588 | 588 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
589 | 589 | created new head |
|
590 | 590 | $ hg tglog |
|
591 | @ 5: 'E' | |
|
591 | @ 5: fbfb97b1089a 'E' | |
|
592 | 592 | | |
|
593 | | o 4: 'E' | |
|
593 | | o 4: f338eb3c2c7c 'E' | |
|
594 | 594 | |/ |
|
595 | o 3: 'D' | |
|
595 | o 3: 41acb9dca9eb 'D' | |
|
596 | 596 | | |
|
597 | | o 2: 'C' two | |
|
597 | | o 2: 8ac4a08debf1 'C' two | |
|
598 | 598 | | | |
|
599 | | o 1: 'B' one | |
|
599 | | o 1: 1ba175478953 'B' one | |
|
600 | 600 | |/ |
|
601 | o 0: 'A' | |
|
601 | o 0: 1994f17a630e 'A' | |
|
602 | 602 | |
|
603 | 603 | $ hg rebase -s 5 -d 4 |
|
604 | 604 | rebasing 5:fbfb97b1089a "E" (tip) |
|
605 | 605 | note: rebase of 5:fbfb97b1089a created no changes to commit |
|
606 | 606 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg (glob) |
|
607 | 607 | $ hg tglog |
|
608 | @ 4: 'E' | |
|
608 | @ 4: f338eb3c2c7c 'E' | |
|
609 | 609 | | |
|
610 | o 3: 'D' | |
|
610 | o 3: 41acb9dca9eb 'D' | |
|
611 | 611 | | |
|
612 | | o 2: 'C' two | |
|
612 | | o 2: 8ac4a08debf1 'C' two | |
|
613 | 613 | | | |
|
614 | | o 1: 'B' one | |
|
614 | | o 1: 1ba175478953 'B' one | |
|
615 | 615 | |/ |
|
616 | o 0: 'A' | |
|
616 | o 0: 1994f17a630e 'A' | |
|
617 | 617 | |
|
618 | 618 | $ hg export tip |
|
619 | 619 | # HG changeset patch |
|
620 | 620 | # User user1 |
|
621 | 621 | # Date 0 0 |
|
622 | 622 | # Thu Jan 01 00:00:00 1970 +0000 |
|
623 | 623 | # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 |
|
624 | 624 | # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 |
|
625 | 625 | E |
|
626 | 626 | |
|
627 | 627 | diff -r 41acb9dca9eb -r f338eb3c2c7c z |
|
628 | 628 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
629 | 629 | +++ b/z Thu Jan 01 00:00:00 1970 +0000 |
|
630 | 630 | @@ -0,0 +1,2 @@ |
|
631 | 631 | +d |
|
632 | 632 | +blah |
|
633 | 633 | |
|
634 | 634 | $ cd .. |
|
635 | 635 | |
|
636 | 636 | Rebase, collapse and copies |
|
637 | 637 | |
|
638 | 638 | $ hg init copies |
|
639 | 639 | $ cd copies |
|
640 | 640 | $ hg unbundle "$TESTDIR/bundles/renames.hg" |
|
641 | 641 | adding changesets |
|
642 | 642 | adding manifests |
|
643 | 643 | adding file changes |
|
644 | 644 | added 4 changesets with 11 changes to 7 files (+1 heads) |
|
645 | 645 | new changesets f447d5abf5ea:338e84e2e558 |
|
646 | 646 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
647 | 647 | $ hg up -q tip |
|
648 | 648 | $ hg tglog |
|
649 | @ 3: 'move2' | |
|
649 | @ 3: 338e84e2e558 'move2' | |
|
650 | 650 | | |
|
651 | o 2: 'move1' | |
|
651 | o 2: 6e7340ee38c0 'move1' | |
|
652 | 652 | | |
|
653 | | o 1: 'change' | |
|
653 | | o 1: 1352765a01d4 'change' | |
|
654 | 654 | |/ |
|
655 | o 0: 'add' | |
|
655 | o 0: f447d5abf5ea 'add' | |
|
656 | 656 | |
|
657 | 657 | $ hg rebase --collapse -d 1 |
|
658 | 658 | rebasing 2:6e7340ee38c0 "move1" |
|
659 | 659 | merging a and d to d |
|
660 | 660 | merging b and e to e |
|
661 | 661 | merging c and f to f |
|
662 | 662 | rebasing 3:338e84e2e558 "move2" (tip) |
|
663 | 663 | merging f and c to c |
|
664 | 664 | merging e and g to g |
|
665 | 665 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg (glob) |
|
666 | 666 | $ hg st |
|
667 | 667 | $ hg st --copies --change tip |
|
668 | 668 | A d |
|
669 | 669 | a |
|
670 | 670 | A g |
|
671 | 671 | b |
|
672 | 672 | R b |
|
673 | 673 | $ hg up tip -q |
|
674 | 674 | $ cat c |
|
675 | 675 | c |
|
676 | 676 | c |
|
677 | 677 | $ cat d |
|
678 | 678 | a |
|
679 | 679 | a |
|
680 | 680 | $ cat g |
|
681 | 681 | b |
|
682 | 682 | b |
|
683 | 683 | $ hg log -r . --template "{file_copies}\n" |
|
684 | 684 | d (a)g (b) |
|
685 | 685 | |
|
686 | 686 | Test collapsing a middle revision in-place |
|
687 | 687 | |
|
688 | 688 | $ hg tglog |
|
689 | @ 2: 'Collapsed revision | |
|
689 | @ 2: 64b456429f67 'Collapsed revision | |
|
690 | 690 | | * move1 |
|
691 | 691 | | * move2' |
|
692 | o 1: 'change' | |
|
692 | o 1: 1352765a01d4 'change' | |
|
693 | 693 | | |
|
694 | o 0: 'add' | |
|
694 | o 0: f447d5abf5ea 'add' | |
|
695 | 695 | |
|
696 | 696 | $ hg rebase --collapse -r 1 -d 0 |
|
697 | 697 | abort: can't remove original changesets with unrebased descendants |
|
698 | 698 | (use --keep to keep original changesets) |
|
699 | 699 | [255] |
|
700 | 700 | |
|
701 | 701 | Test collapsing in place |
|
702 | 702 | |
|
703 | 703 | $ hg rebase --collapse -b . -d 0 |
|
704 | 704 | rebasing 1:1352765a01d4 "change" |
|
705 | 705 | rebasing 2:64b456429f67 "Collapsed revision" (tip) |
|
706 | 706 | saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg (glob) |
|
707 | 707 | $ hg st --change tip --copies |
|
708 | 708 | M a |
|
709 | 709 | M c |
|
710 | 710 | A d |
|
711 | 711 | a |
|
712 | 712 | A g |
|
713 | 713 | b |
|
714 | 714 | R b |
|
715 | 715 | $ hg up tip -q |
|
716 | 716 | $ cat a |
|
717 | 717 | a |
|
718 | 718 | a |
|
719 | 719 | $ cat c |
|
720 | 720 | c |
|
721 | 721 | c |
|
722 | 722 | $ cat d |
|
723 | 723 | a |
|
724 | 724 | a |
|
725 | 725 | $ cat g |
|
726 | 726 | b |
|
727 | 727 | b |
|
728 | 728 | $ cd .. |
|
729 | 729 | |
|
730 | 730 | |
|
731 | 731 | Test stripping a revision with another child |
|
732 | 732 | |
|
733 | 733 | $ hg init f |
|
734 | 734 | $ cd f |
|
735 | 735 | |
|
736 | 736 | $ echo A > A |
|
737 | 737 | $ hg ci -Am A |
|
738 | 738 | adding A |
|
739 | 739 | $ echo B > B |
|
740 | 740 | $ hg ci -Am B |
|
741 | 741 | adding B |
|
742 | 742 | |
|
743 | 743 | $ hg up -q 0 |
|
744 | 744 | |
|
745 | 745 | $ echo C > C |
|
746 | 746 | $ hg ci -Am C |
|
747 | 747 | adding C |
|
748 | 748 | created new head |
|
749 | 749 | |
|
750 | 750 | $ hg tglog |
|
751 | @ 2: 'C' | |
|
751 | @ 2: c5cefa58fd55 'C' | |
|
752 | 752 | | |
|
753 | | o 1: 'B' | |
|
753 | | o 1: 27547f69f254 'B' | |
|
754 | 754 | |/ |
|
755 | o 0: 'A' | |
|
755 | o 0: 4a2df7238c3b 'A' | |
|
756 | 756 | |
|
757 | 757 | |
|
758 | 758 | |
|
759 | 759 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
760 | 760 | 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C |
|
761 | 761 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
762 | 762 | |
|
763 | 763 | $ hg strip 2 |
|
764 | 764 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
765 | 765 | saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg (glob) |
|
766 | 766 | |
|
767 | 767 | $ hg tglog |
|
768 | o 1: 'B' | |
|
768 | o 1: 27547f69f254 'B' | |
|
769 | 769 | | |
|
770 | @ 0: 'A' | |
|
770 | @ 0: 4a2df7238c3b 'A' | |
|
771 | 771 | |
|
772 | 772 | |
|
773 | 773 | |
|
774 | 774 | $ hg heads --template="{rev}:{node} {branch}: {desc}\n" |
|
775 | 775 | 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B |
|
776 | 776 | |
|
777 | 777 | $ cd .. |
|
778 | 778 | |
|
779 | 779 | Test collapsing changes that add then remove a file |
|
780 | 780 | |
|
781 | 781 | $ hg init collapseaddremove |
|
782 | 782 | $ cd collapseaddremove |
|
783 | 783 | |
|
784 | 784 | $ touch base |
|
785 | 785 | $ hg commit -Am base |
|
786 | 786 | adding base |
|
787 | 787 | $ touch a |
|
788 | 788 | $ hg commit -Am a |
|
789 | 789 | adding a |
|
790 | 790 | $ hg rm a |
|
791 | 791 | $ touch b |
|
792 | 792 | $ hg commit -Am b |
|
793 | 793 | adding b |
|
794 | 794 | $ hg book foo |
|
795 | 795 | $ hg rebase -d 0 -r "1::2" --collapse -m collapsed |
|
796 | 796 | rebasing 1:6d8d9f24eec3 "a" |
|
797 | 797 | rebasing 2:1cc73eca5ecc "b" (foo tip) |
|
798 | 798 | saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg (glob) |
|
799 | 799 | $ hg log -G --template "{rev}: '{desc}' {bookmarks}" |
|
800 | 800 | @ 1: 'collapsed' foo |
|
801 | 801 | | |
|
802 | 802 | o 0: 'base' |
|
803 | 803 | |
|
804 | 804 | $ hg manifest --rev tip |
|
805 | 805 | b |
|
806 | 806 | base |
|
807 | 807 | |
|
808 | 808 | $ cd .. |
|
809 | 809 | |
|
810 | 810 | Test that rebase --collapse will remember message after |
|
811 | 811 | running into merge conflict and invoking rebase --continue. |
|
812 | 812 | |
|
813 | 813 | $ hg init collapse_remember_message |
|
814 | 814 | $ cd collapse_remember_message |
|
815 | 815 | $ touch a |
|
816 | 816 | $ hg add a |
|
817 | 817 | $ hg commit -m "a" |
|
818 | 818 | $ echo "a-default" > a |
|
819 | 819 | $ hg commit -m "a-default" |
|
820 | 820 | $ hg update -r 0 |
|
821 | 821 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
822 | 822 | $ hg branch dev |
|
823 | 823 | marked working directory as branch dev |
|
824 | 824 | (branches are permanent and global, did you want a bookmark?) |
|
825 | 825 | $ echo "a-dev" > a |
|
826 | 826 | $ hg commit -m "a-dev" |
|
827 | 827 | $ hg rebase --collapse -m "a-default-dev" -d 1 |
|
828 | 828 | rebasing 2:b8d8db2b242d "a-dev" (tip) |
|
829 | 829 | merging a |
|
830 | 830 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
831 | 831 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
832 | 832 | [1] |
|
833 | 833 | $ rm a.orig |
|
834 | 834 | $ hg resolve --mark a |
|
835 | 835 | (no more unresolved files) |
|
836 | 836 | continue: hg rebase --continue |
|
837 | 837 | $ hg rebase --continue |
|
838 | 838 | rebasing 2:b8d8db2b242d "a-dev" (tip) |
|
839 | 839 | saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg (glob) |
|
840 | 840 | $ hg log |
|
841 | 841 | changeset: 2:45ba1d1a8665 |
|
842 | 842 | tag: tip |
|
843 | 843 | user: test |
|
844 | 844 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
845 | 845 | summary: a-default-dev |
|
846 | 846 | |
|
847 | 847 | changeset: 1:3c8db56a44bc |
|
848 | 848 | user: test |
|
849 | 849 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
850 | 850 | summary: a-default |
|
851 | 851 | |
|
852 | 852 | changeset: 0:3903775176ed |
|
853 | 853 | user: test |
|
854 | 854 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
855 | 855 | summary: a |
|
856 | 856 | |
|
857 | 857 | $ cd .. |
@@ -1,452 +1,452 b'' | |||
|
1 | 1 | Require a destination |
|
2 | 2 | $ cat >> $HGRCPATH <<EOF |
|
3 | 3 | > [extensions] |
|
4 | 4 | > rebase = |
|
5 | 5 | > [commands] |
|
6 | 6 | > rebase.requiredest = True |
|
7 | 7 | > EOF |
|
8 | 8 | $ hg init repo |
|
9 | 9 | $ cd repo |
|
10 | 10 | $ echo a >> a |
|
11 | 11 | $ hg commit -qAm aa |
|
12 | 12 | $ echo b >> b |
|
13 | 13 | $ hg commit -qAm bb |
|
14 | 14 | $ hg up ".^" |
|
15 | 15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
16 | 16 | $ echo c >> c |
|
17 | 17 | $ hg commit -qAm cc |
|
18 | 18 | $ hg rebase |
|
19 | 19 | abort: you must specify a destination |
|
20 | 20 | (use: hg rebase -d REV) |
|
21 | 21 | [255] |
|
22 | 22 | $ hg rebase -d 1 |
|
23 | 23 | rebasing 2:5db65b93a12b "cc" (tip) |
|
24 | 24 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/5db65b93a12b-4fb789ec-rebase.hg (glob) |
|
25 | 25 | $ hg rebase -d 0 -r . -q |
|
26 | 26 | $ HGPLAIN=1 hg rebase |
|
27 | 27 | rebasing 2:889b0bc6a730 "cc" (tip) |
|
28 | 28 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-rebase.hg (glob) |
|
29 | 29 | $ hg rebase -d 0 -r . -q |
|
30 | 30 | $ hg --config commands.rebase.requiredest=False rebase |
|
31 | 31 | rebasing 2:279de9495438 "cc" (tip) |
|
32 | 32 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-rebase.hg (glob) |
|
33 | 33 | |
|
34 | 34 | Requiring dest should not break continue or other rebase options |
|
35 | 35 | $ hg up 1 -q |
|
36 | 36 | $ echo d >> c |
|
37 | 37 | $ hg commit -qAm dc |
|
38 | 38 | $ hg log -G -T '{rev} {desc}' |
|
39 | 39 | @ 3 dc |
|
40 | 40 | | |
|
41 | 41 | | o 2 cc |
|
42 | 42 | |/ |
|
43 | 43 | o 1 bb |
|
44 | 44 | | |
|
45 | 45 | o 0 aa |
|
46 | 46 | |
|
47 | 47 | $ hg rebase -d 2 |
|
48 | 48 | rebasing 3:0537f6b50def "dc" (tip) |
|
49 | 49 | merging c |
|
50 | 50 | warning: conflicts while merging c! (edit, then use 'hg resolve --mark') |
|
51 | 51 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
52 | 52 | [1] |
|
53 | 53 | $ echo d > c |
|
54 | 54 | $ hg resolve --mark --all |
|
55 | 55 | (no more unresolved files) |
|
56 | 56 | continue: hg rebase --continue |
|
57 | 57 | $ hg rebase --continue |
|
58 | 58 | rebasing 3:0537f6b50def "dc" (tip) |
|
59 | 59 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0537f6b50def-be4c7386-rebase.hg (glob) |
|
60 | 60 | |
|
61 | 61 | $ cd .. |
|
62 | 62 | |
|
63 | 63 | Check rebase.requiredest interaction with pull --rebase |
|
64 | 64 | $ hg clone repo clone |
|
65 | 65 | updating to branch default |
|
66 | 66 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
67 | 67 | $ cd repo |
|
68 | 68 | $ echo e > e |
|
69 | 69 | $ hg commit -qAm ee |
|
70 | 70 | $ cd .. |
|
71 | 71 | $ cd clone |
|
72 | 72 | $ echo f > f |
|
73 | 73 | $ hg commit -qAm ff |
|
74 | 74 | $ hg pull --rebase |
|
75 | 75 | abort: rebase destination required by configuration |
|
76 | 76 | (use hg pull followed by hg rebase -d DEST) |
|
77 | 77 | [255] |
|
78 | 78 | |
|
79 | 79 | Setup rebase with multiple destinations |
|
80 | 80 | |
|
81 | 81 | $ cd $TESTTMP |
|
82 | 82 | |
|
83 | 83 | $ cat >> $TESTTMP/maprevset.py <<EOF |
|
84 | 84 | > from __future__ import absolute_import |
|
85 | 85 | > from mercurial import registrar, revset, revsetlang, smartset |
|
86 | 86 | > revsetpredicate = registrar.revsetpredicate() |
|
87 | 87 | > cache = {} |
|
88 | 88 | > @revsetpredicate('map') |
|
89 | 89 | > def map(repo, subset, x): |
|
90 | 90 | > """(set, mapping)""" |
|
91 | 91 | > setarg, maparg = revsetlang.getargs(x, 2, 2, '') |
|
92 | 92 | > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) |
|
93 | 93 | > mapstr = revsetlang.getstring(maparg, '') |
|
94 | 94 | > map = dict(a.split(':') for a in mapstr.split(',')) |
|
95 | 95 | > rev = rset.first() |
|
96 | 96 | > desc = repo[rev].description() |
|
97 | 97 | > newdesc = map.get(desc) |
|
98 | 98 | > if newdesc == 'null': |
|
99 | 99 | > revs = [-1] |
|
100 | 100 | > else: |
|
101 | 101 | > query = revsetlang.formatspec('desc(%s)', newdesc) |
|
102 | 102 | > revs = repo.revs(query) |
|
103 | 103 | > return smartset.baseset(revs) |
|
104 | 104 | > EOF |
|
105 | 105 | |
|
106 | 106 | $ cat >> $HGRCPATH <<EOF |
|
107 | 107 | > [ui] |
|
108 | 108 | > allowemptycommit=1 |
|
109 | 109 | > [extensions] |
|
110 | 110 | > drawdag=$TESTDIR/drawdag.py |
|
111 | 111 | > [phases] |
|
112 | 112 | > publish=False |
|
113 | 113 | > [alias] |
|
114 | > tglog = log -G --template "{rev}: {desc} {instabilities}" -r 'sort(all(), topo)' | |
|
114 | > tglog = log -G --template "{rev}: {node|short} {desc} {instabilities}" -r 'sort(all(), topo)' | |
|
115 | 115 | > [extensions] |
|
116 | 116 | > maprevset=$TESTTMP/maprevset.py |
|
117 | 117 | > [experimental] |
|
118 | 118 | > evolution=true |
|
119 | 119 | > EOF |
|
120 | 120 | |
|
121 | 121 | $ rebasewithdag() { |
|
122 | 122 | > N=`$PYTHON -c "print($N+1)"` |
|
123 | 123 | > hg init repo$N && cd repo$N |
|
124 | 124 | > hg debugdrawdag |
|
125 | 125 | > hg rebase "$@" > _rebasetmp |
|
126 | 126 | > r=$? |
|
127 | 127 | > grep -v 'saved backup bundle' _rebasetmp |
|
128 | 128 | > [ $r -eq 0 ] && rm -f .hg/localtags && hg tglog |
|
129 | 129 | > cd .. |
|
130 | 130 | > return $r |
|
131 | 131 | > } |
|
132 | 132 | |
|
133 | 133 | Destination resolves to an empty set: |
|
134 | 134 | |
|
135 | 135 | $ rebasewithdag -s B -d 'SRC - SRC' <<'EOS' |
|
136 | 136 | > C |
|
137 | 137 | > | |
|
138 | 138 | > B |
|
139 | 139 | > | |
|
140 | 140 | > A |
|
141 | 141 | > EOS |
|
142 | 142 | nothing to rebase - empty destination |
|
143 | 143 | [1] |
|
144 | 144 | |
|
145 | 145 | Multiple destinations and --collapse are not compatible: |
|
146 | 146 | |
|
147 | 147 | $ rebasewithdag -s C+E -d 'SRC^^' --collapse <<'EOS' |
|
148 | 148 | > C F |
|
149 | 149 | > | | |
|
150 | 150 | > B E |
|
151 | 151 | > | | |
|
152 | 152 | > A D |
|
153 | 153 | > EOS |
|
154 | 154 | abort: --collapse does not work with multiple destinations |
|
155 | 155 | [255] |
|
156 | 156 | |
|
157 | 157 | Multiple destinations cannot be used with --base: |
|
158 | 158 | |
|
159 | 159 | $ rebasewithdag -b B+E -d 'SRC^^' --collapse <<'EOS' |
|
160 | 160 | > B E |
|
161 | 161 | > | | |
|
162 | 162 | > A D |
|
163 | 163 | > EOS |
|
164 | 164 | abort: unknown revision 'SRC'! |
|
165 | 165 | [255] |
|
166 | 166 | |
|
167 | 167 | Rebase to null should work: |
|
168 | 168 | |
|
169 | 169 | $ rebasewithdag -r A+C+D -d 'null' <<'EOS' |
|
170 | 170 | > C D |
|
171 | 171 | > | | |
|
172 | 172 | > A B |
|
173 | 173 | > EOS |
|
174 | 174 | already rebased 0:426bada5c675 "A" (A) |
|
175 | 175 | already rebased 2:dc0947a82db8 "C" (C) |
|
176 | 176 | rebasing 3:004dc1679908 "D" (D tip) |
|
177 | o 4: D | |
|
177 | o 4: d8d8601abd5e D | |
|
178 | 178 | |
|
179 | o 2: C | |
|
179 | o 2: dc0947a82db8 C | |
|
180 | 180 | | |
|
181 | | o 1: B | |
|
181 | | o 1: fc2b737bb2e5 B | |
|
182 | 182 | | |
|
183 | o 0: A | |
|
183 | o 0: 426bada5c675 A | |
|
184 | 184 | |
|
185 | 185 | Destination resolves to multiple changesets: |
|
186 | 186 | |
|
187 | 187 | $ rebasewithdag -s B -d 'ALLSRC+SRC' <<'EOS' |
|
188 | 188 | > C |
|
189 | 189 | > | |
|
190 | 190 | > B |
|
191 | 191 | > | |
|
192 | 192 | > Z |
|
193 | 193 | > EOS |
|
194 | 194 | abort: rebase destination for f0a671a46792 is not unique |
|
195 | 195 | [255] |
|
196 | 196 | |
|
197 | 197 | Destination is an ancestor of source: |
|
198 | 198 | |
|
199 | 199 | $ rebasewithdag -s B -d 'SRC' <<'EOS' |
|
200 | 200 | > C |
|
201 | 201 | > | |
|
202 | 202 | > B |
|
203 | 203 | > | |
|
204 | 204 | > Z |
|
205 | 205 | > EOS |
|
206 | 206 | abort: source and destination form a cycle |
|
207 | 207 | [255] |
|
208 | 208 | |
|
209 | 209 | Switch roots: |
|
210 | 210 | |
|
211 | 211 | $ rebasewithdag -s 'all() - roots(all())' -d 'roots(all()) - ::SRC' <<'EOS' |
|
212 | 212 | > C F |
|
213 | 213 | > | | |
|
214 | 214 | > B E |
|
215 | 215 | > | | |
|
216 | 216 | > A D |
|
217 | 217 | > EOS |
|
218 | 218 | rebasing 2:112478962961 "B" (B) |
|
219 | 219 | rebasing 4:26805aba1e60 "C" (C) |
|
220 | 220 | rebasing 3:cd488e83d208 "E" (E) |
|
221 | 221 | rebasing 5:0069ba24938a "F" (F tip) |
|
222 | o 9: F | |
|
222 | o 9: d150ff263fc8 F | |
|
223 | 223 | | |
|
224 | o 8: E | |
|
224 | o 8: 66f30a1a2eab E | |
|
225 | 225 | | |
|
226 | | o 7: C | |
|
226 | | o 7: 93db94ffae0e C | |
|
227 | 227 | | | |
|
228 | | o 6: B | |
|
228 | | o 6: d0071c3b0c88 B | |
|
229 | 229 | | | |
|
230 | | o 1: D | |
|
230 | | o 1: 058c1e1fb10a D | |
|
231 | 231 | | |
|
232 | o 0: A | |
|
232 | o 0: 426bada5c675 A | |
|
233 | 233 | |
|
234 | 234 | Different destinations for merge changesets with a same root: |
|
235 | 235 | |
|
236 | 236 | $ rebasewithdag -s B -d '((parents(SRC)-B-A)::) - (::ALLSRC)' <<'EOS' |
|
237 | 237 | > C G |
|
238 | 238 | > |\| |
|
239 | 239 | > | F |
|
240 | 240 | > | |
|
241 | 241 | > B E |
|
242 | 242 | > |\| |
|
243 | 243 | > A D |
|
244 | 244 | > EOS |
|
245 | 245 | rebasing 3:a4256619d830 "B" (B) |
|
246 | 246 | rebasing 6:8e139e245220 "C" (C tip) |
|
247 | o 8: C | |
|
247 | o 8: 51e2ce92e06a C | |
|
248 | 248 | |\ |
|
249 | | o 7: B | |
|
249 | | o 7: 2ed0c8546285 B | |
|
250 | 250 | | |\ |
|
251 | o | | 5: G | |
|
251 | o | | 5: 8fdb2c1feb20 G | |
|
252 | 252 | | | | |
|
253 | | | o 4: E | |
|
253 | | | o 4: cd488e83d208 E | |
|
254 | 254 | | | | |
|
255 | o | | 2: F | |
|
255 | o | | 2: a6661b868de9 F | |
|
256 | 256 | / / |
|
257 | | o 1: D | |
|
257 | | o 1: 058c1e1fb10a D | |
|
258 | 258 | | |
|
259 | o 0: A | |
|
259 | o 0: 426bada5c675 A | |
|
260 | 260 | |
|
261 | 261 | Move to a previous parent: |
|
262 | 262 | |
|
263 | 263 | $ rebasewithdag -s E+F+G -d 'SRC^^' <<'EOS' |
|
264 | 264 | > H |
|
265 | 265 | > | |
|
266 | 266 | > D G |
|
267 | 267 | > |/ |
|
268 | 268 | > C F |
|
269 | 269 | > |/ |
|
270 | 270 | > B E # E will be ignored, since E^^ is empty |
|
271 | 271 | > |/ |
|
272 | 272 | > A |
|
273 | 273 | > EOS |
|
274 | 274 | rebasing 4:33441538d4aa "F" (F) |
|
275 | 275 | rebasing 6:cf43ad9da869 "G" (G) |
|
276 | 276 | rebasing 7:eef94f3b5f03 "H" (H tip) |
|
277 | o 10: H | |
|
277 | o 10: b3d84c6666cf H | |
|
278 | 278 | | |
|
279 | | o 5: D | |
|
279 | | o 5: f585351a92f8 D | |
|
280 | 280 | |/ |
|
281 | o 3: C | |
|
281 | o 3: 26805aba1e60 C | |
|
282 | 282 | | |
|
283 | | o 9: G | |
|
283 | | o 9: f7c28a1a15e2 G | |
|
284 | 284 | |/ |
|
285 | o 1: B | |
|
285 | o 1: 112478962961 B | |
|
286 | 286 | | |
|
287 | | o 8: F | |
|
287 | | o 8: 02aa697facf7 F | |
|
288 | 288 | |/ |
|
289 | | o 2: E | |
|
289 | | o 2: 7fb047a69f22 E | |
|
290 | 290 | |/ |
|
291 | o 0: A | |
|
291 | o 0: 426bada5c675 A | |
|
292 | 292 | |
|
293 | 293 | Source overlaps with destination: |
|
294 | 294 | |
|
295 | 295 | $ rebasewithdag -s 'B+C+D' -d 'map(SRC, "B:C,C:D")' <<'EOS' |
|
296 | 296 | > B C D |
|
297 | 297 | > \|/ |
|
298 | 298 | > A |
|
299 | 299 | > EOS |
|
300 | 300 | rebasing 2:dc0947a82db8 "C" (C) |
|
301 | 301 | rebasing 1:112478962961 "B" (B) |
|
302 | o 5: B | |
|
302 | o 5: 5fe9935d5222 B | |
|
303 | 303 | | |
|
304 | o 4: C | |
|
304 | o 4: 12d20731b9e0 C | |
|
305 | 305 | | |
|
306 | o 3: D | |
|
306 | o 3: b18e25de2cf5 D | |
|
307 | 307 | | |
|
308 | o 0: A | |
|
308 | o 0: 426bada5c675 A | |
|
309 | 309 | |
|
310 | 310 | Detect cycles early: |
|
311 | 311 | |
|
312 | 312 | $ rebasewithdag -r 'all()-Z' -d 'map(SRC, "A:B,B:C,C:D,D:B")' <<'EOS' |
|
313 | 313 | > A B C |
|
314 | 314 | > \|/ |
|
315 | 315 | > | D |
|
316 | 316 | > |/ |
|
317 | 317 | > Z |
|
318 | 318 | > EOS |
|
319 | 319 | abort: source and destination form a cycle |
|
320 | 320 | [255] |
|
321 | 321 | |
|
322 | 322 | Detect source is ancestor of dest in runtime: |
|
323 | 323 | |
|
324 | 324 | $ rebasewithdag -r 'C+B' -d 'map(SRC, "C:B,B:D")' -q <<'EOS' |
|
325 | 325 | > D |
|
326 | 326 | > | |
|
327 | 327 | > B C |
|
328 | 328 | > \| |
|
329 | 329 | > A |
|
330 | 330 | > EOS |
|
331 | 331 | abort: source is ancestor of destination |
|
332 | 332 | [255] |
|
333 | 333 | |
|
334 | 334 | "Already rebased" fast path still works: |
|
335 | 335 | |
|
336 | 336 | $ rebasewithdag -r 'all()' -d 'SRC^' <<'EOS' |
|
337 | 337 | > E F |
|
338 | 338 | > /| | |
|
339 | 339 | > B C D |
|
340 | 340 | > \|/ |
|
341 | 341 | > A |
|
342 | 342 | > EOS |
|
343 | 343 | already rebased 1:112478962961 "B" (B) |
|
344 | 344 | already rebased 2:dc0947a82db8 "C" (C) |
|
345 | 345 | already rebased 3:b18e25de2cf5 "D" (D) |
|
346 | 346 | already rebased 4:312782b8f06e "E" (E) |
|
347 | 347 | already rebased 5:ad6717a6a58e "F" (F tip) |
|
348 | o 5: F | |
|
348 | o 5: ad6717a6a58e F | |
|
349 | 349 | | |
|
350 | o 3: D | |
|
350 | o 3: b18e25de2cf5 D | |
|
351 | 351 | | |
|
352 | | o 4: E | |
|
352 | | o 4: 312782b8f06e E | |
|
353 | 353 | | |\ |
|
354 | +---o 2: C | |
|
354 | +---o 2: dc0947a82db8 C | |
|
355 | 355 | | | |
|
356 | | o 1: B | |
|
356 | | o 1: 112478962961 B | |
|
357 | 357 | |/ |
|
358 | o 0: A | |
|
358 | o 0: 426bada5c675 A | |
|
359 | 359 | |
|
360 | 360 | Massively rewrite the DAG: |
|
361 | 361 | |
|
362 | 362 | $ rebasewithdag -r 'all()' -d 'map(SRC, "A:I,I:null,H:A,B:J,J:C,C:H,D:E,F:G,G:K,K:D,E:B")' <<'EOS' |
|
363 | 363 | > D G K |
|
364 | 364 | > | | | |
|
365 | 365 | > C F J |
|
366 | 366 | > | | | |
|
367 | 367 | > B E I |
|
368 | 368 | > \| | |
|
369 | 369 | > A H |
|
370 | 370 | > EOS |
|
371 | 371 | rebasing 4:701514e1408d "I" (I) |
|
372 | 372 | rebasing 0:426bada5c675 "A" (A) |
|
373 | 373 | rebasing 1:e7050b6e5048 "H" (H) |
|
374 | 374 | rebasing 5:26805aba1e60 "C" (C) |
|
375 | 375 | rebasing 7:cf89f86b485b "J" (J) |
|
376 | 376 | rebasing 2:112478962961 "B" (B) |
|
377 | 377 | rebasing 3:7fb047a69f22 "E" (E) |
|
378 | 378 | rebasing 8:f585351a92f8 "D" (D) |
|
379 | 379 | rebasing 10:ae41898d7875 "K" (K tip) |
|
380 | 380 | rebasing 9:711f53bbef0b "G" (G) |
|
381 | 381 | rebasing 6:64a8289d2492 "F" (F) |
|
382 | o 21: F | |
|
382 | o 21: 3735afb3713a F | |
|
383 | 383 | | |
|
384 | o 20: G | |
|
384 | o 20: 07698142d7a7 G | |
|
385 | 385 | | |
|
386 | o 19: K | |
|
386 | o 19: 33aba52e7e72 K | |
|
387 | 387 | | |
|
388 | o 18: D | |
|
388 | o 18: 9fdae89dc5a1 D | |
|
389 | 389 | | |
|
390 | o 17: E | |
|
390 | o 17: 277dda9a65ee E | |
|
391 | 391 | | |
|
392 | o 16: B | |
|
392 | o 16: 9c74fd8657ad B | |
|
393 | 393 | | |
|
394 | o 15: J | |
|
394 | o 15: 6527eb0688bb J | |
|
395 | 395 | | |
|
396 | o 14: C | |
|
396 | o 14: e94d655b928d C | |
|
397 | 397 | | |
|
398 | o 13: H | |
|
398 | o 13: 620d6d349459 H | |
|
399 | 399 | | |
|
400 | o 12: A | |
|
400 | o 12: a569a116758f A | |
|
401 | 401 | | |
|
402 | o 11: I | |
|
402 | o 11: 2bf1302f5c18 I | |
|
403 | 403 | |
|
404 | 404 | Resolve instability: |
|
405 | 405 | |
|
406 | 406 | $ rebasewithdag <<'EOF' -r 'orphan()-obsolete()' -d 'max((successors(max(roots(ALLSRC) & ::SRC)^)-obsolete())::)' |
|
407 | 407 | > F2 |
|
408 | 408 | > | |
|
409 | 409 | > J E E2 |
|
410 | 410 | > | |/ |
|
411 | 411 | > I2 I | E3 |
|
412 | 412 | > \| |/ |
|
413 | 413 | > H | G |
|
414 | 414 | > | | | |
|
415 | 415 | > B2 D F |
|
416 | 416 | > | |/ # rebase: B -> B2 |
|
417 | 417 | > N C # amend: E -> E2 |
|
418 | 418 | > | | # amend: E2 -> E3 |
|
419 | 419 | > M B # rebase: F -> F2 |
|
420 | 420 | > \| # amend: I -> I2 |
|
421 | 421 | > A |
|
422 | 422 | > EOF |
|
423 | 423 | rebasing 16:5c432343bf59 "J" (J tip) |
|
424 | 424 | rebasing 3:26805aba1e60 "C" (C) |
|
425 | 425 | rebasing 6:f585351a92f8 "D" (D) |
|
426 | 426 | rebasing 10:ffebc37c5d0b "E3" (E3) |
|
427 | 427 | rebasing 13:fb184bcfeee8 "F2" (F2) |
|
428 | 428 | rebasing 11:dc838ab4c0da "G" (G) |
|
429 | o 22: G | |
|
429 | o 22: 174f63d574a8 G | |
|
430 | 430 | | |
|
431 | o 21: F2 | |
|
431 | o 21: c9d9fbe76705 F2 | |
|
432 | 432 | | |
|
433 | o 20: E3 | |
|
433 | o 20: 0a03c2ede755 E3 | |
|
434 | 434 | | |
|
435 | o 19: D | |
|
435 | o 19: 228d9d2541b1 D | |
|
436 | 436 | | |
|
437 | o 18: C | |
|
437 | o 18: cd856b400c95 C | |
|
438 | 438 | | |
|
439 | o 17: J | |
|
439 | o 17: 9148200c858c J | |
|
440 | 440 | | |
|
441 | o 15: I2 | |
|
441 | o 15: eb74780f5094 I2 | |
|
442 | 442 | | |
|
443 | o 12: H | |
|
443 | o 12: 78309edd643f H | |
|
444 | 444 | | |
|
445 | o 5: B2 | |
|
445 | o 5: 4b4531bd8e1d B2 | |
|
446 | 446 | | |
|
447 | o 4: N | |
|
447 | o 4: 337c285c272b N | |
|
448 | 448 | | |
|
449 | o 2: M | |
|
449 | o 2: 699bc4b6fa22 M | |
|
450 | 450 | | |
|
451 | o 0: A | |
|
451 | o 0: 426bada5c675 A | |
|
452 | 452 |
@@ -1,317 +1,317 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [alias] |
|
6 | > tglog = log -G --template "{rev}: '{desc}'\n" | |
|
6 | > tglog = log -G --template "{rev}: {node|short} '{desc}'\n" | |
|
7 | 7 | > |
|
8 | 8 | > [extensions] |
|
9 | 9 | > drawdag=$TESTDIR/drawdag.py |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | Rebasing D onto B detaching from C (one commit): |
|
13 | 13 | |
|
14 | 14 | $ hg init a1 |
|
15 | 15 | $ cd a1 |
|
16 | 16 | |
|
17 | 17 | $ hg debugdrawdag <<EOF |
|
18 | 18 | > D |
|
19 | 19 | > | |
|
20 | 20 | > C B |
|
21 | 21 | > |/ |
|
22 | 22 | > A |
|
23 | 23 | > EOF |
|
24 | 24 | $ hg phase --force --secret D |
|
25 | 25 | |
|
26 | 26 | $ hg rebase -s D -d B |
|
27 | 27 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
28 | 28 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/e7b3f00ed42e-6f368371-rebase.hg (glob) |
|
29 | 29 | |
|
30 | 30 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
31 | 31 | o 3:secret 'D' |
|
32 | 32 | | |
|
33 | 33 | | o 2:draft 'C' |
|
34 | 34 | | | |
|
35 | 35 | o | 1:draft 'B' |
|
36 | 36 | |/ |
|
37 | 37 | o 0:draft 'A' |
|
38 | 38 | |
|
39 | 39 | $ hg manifest --rev tip |
|
40 | 40 | A |
|
41 | 41 | B |
|
42 | 42 | D |
|
43 | 43 | |
|
44 | 44 | $ cd .. |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | Rebasing D onto B detaching from C (two commits): |
|
48 | 48 | |
|
49 | 49 | $ hg init a2 |
|
50 | 50 | $ cd a2 |
|
51 | 51 | |
|
52 | 52 | $ hg debugdrawdag <<EOF |
|
53 | 53 | > E |
|
54 | 54 | > | |
|
55 | 55 | > D |
|
56 | 56 | > | |
|
57 | 57 | > C B |
|
58 | 58 | > |/ |
|
59 | 59 | > A |
|
60 | 60 | > EOF |
|
61 | 61 | |
|
62 | 62 | $ hg rebase -s D -d B |
|
63 | 63 | rebasing 3:e7b3f00ed42e "D" (D) |
|
64 | 64 | rebasing 4:69a34c08022a "E" (E tip) |
|
65 | 65 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) |
|
66 | 66 | |
|
67 | 67 | $ hg tglog |
|
68 | o 4: 'E' | |
|
68 | o 4: ee79e0744528 'E' | |
|
69 | 69 | | |
|
70 | o 3: 'D' | |
|
70 | o 3: 10530e1d72d9 'D' | |
|
71 | 71 | | |
|
72 | | o 2: 'C' | |
|
72 | | o 2: dc0947a82db8 'C' | |
|
73 | 73 | | | |
|
74 | o | 1: 'B' | |
|
74 | o | 1: 112478962961 'B' | |
|
75 | 75 | |/ |
|
76 | o 0: 'A' | |
|
76 | o 0: 426bada5c675 'A' | |
|
77 | 77 | |
|
78 | 78 | $ hg manifest --rev tip |
|
79 | 79 | A |
|
80 | 80 | B |
|
81 | 81 | D |
|
82 | 82 | E |
|
83 | 83 | |
|
84 | 84 | $ cd .. |
|
85 | 85 | |
|
86 | 86 | Rebasing C onto B using detach (same as not using it): |
|
87 | 87 | |
|
88 | 88 | $ hg init a3 |
|
89 | 89 | $ cd a3 |
|
90 | 90 | |
|
91 | 91 | $ hg debugdrawdag <<EOF |
|
92 | 92 | > D |
|
93 | 93 | > | |
|
94 | 94 | > C B |
|
95 | 95 | > |/ |
|
96 | 96 | > A |
|
97 | 97 | > EOF |
|
98 | 98 | |
|
99 | 99 | $ hg rebase -s C -d B |
|
100 | 100 | rebasing 2:dc0947a82db8 "C" (C) |
|
101 | 101 | rebasing 3:e7b3f00ed42e "D" (D tip) |
|
102 | 102 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/dc0947a82db8-b8481714-rebase.hg (glob) |
|
103 | 103 | |
|
104 | 104 | $ hg tglog |
|
105 | o 3: 'D' | |
|
105 | o 3: 7375f3dbfb0f 'D' | |
|
106 | 106 | | |
|
107 | o 2: 'C' | |
|
107 | o 2: bbfdd6cb49aa 'C' | |
|
108 | 108 | | |
|
109 | o 1: 'B' | |
|
109 | o 1: 112478962961 'B' | |
|
110 | 110 | | |
|
111 | o 0: 'A' | |
|
111 | o 0: 426bada5c675 'A' | |
|
112 | 112 | |
|
113 | 113 | $ hg manifest --rev tip |
|
114 | 114 | A |
|
115 | 115 | B |
|
116 | 116 | C |
|
117 | 117 | D |
|
118 | 118 | |
|
119 | 119 | $ cd .. |
|
120 | 120 | |
|
121 | 121 | |
|
122 | 122 | Rebasing D onto B detaching from C and collapsing: |
|
123 | 123 | |
|
124 | 124 | $ hg init a4 |
|
125 | 125 | $ cd a4 |
|
126 | 126 | |
|
127 | 127 | $ hg debugdrawdag <<EOF |
|
128 | 128 | > E |
|
129 | 129 | > | |
|
130 | 130 | > D |
|
131 | 131 | > | |
|
132 | 132 | > C B |
|
133 | 133 | > |/ |
|
134 | 134 | > A |
|
135 | 135 | > EOF |
|
136 | 136 | $ hg phase --force --secret E |
|
137 | 137 | |
|
138 | 138 | $ hg rebase --collapse -s D -d B |
|
139 | 139 | rebasing 3:e7b3f00ed42e "D" (D) |
|
140 | 140 | rebasing 4:69a34c08022a "E" (E tip) |
|
141 | 141 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/e7b3f00ed42e-a2ec7cea-rebase.hg (glob) |
|
142 | 142 | |
|
143 | 143 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
144 | 144 | o 3:secret 'Collapsed revision |
|
145 | 145 | | * D |
|
146 | 146 | | * E' |
|
147 | 147 | | o 2:draft 'C' |
|
148 | 148 | | | |
|
149 | 149 | o | 1:draft 'B' |
|
150 | 150 | |/ |
|
151 | 151 | o 0:draft 'A' |
|
152 | 152 | |
|
153 | 153 | $ hg manifest --rev tip |
|
154 | 154 | A |
|
155 | 155 | B |
|
156 | 156 | D |
|
157 | 157 | E |
|
158 | 158 | |
|
159 | 159 | $ cd .. |
|
160 | 160 | |
|
161 | 161 | Rebasing across null as ancestor |
|
162 | 162 | $ hg init a5 |
|
163 | 163 | $ cd a5 |
|
164 | 164 | |
|
165 | 165 | $ hg debugdrawdag <<EOF |
|
166 | 166 | > E |
|
167 | 167 | > | |
|
168 | 168 | > D |
|
169 | 169 | > | |
|
170 | 170 | > C |
|
171 | 171 | > | |
|
172 | 172 | > A B |
|
173 | 173 | > EOF |
|
174 | 174 | |
|
175 | 175 | $ hg rebase -s C -d B |
|
176 | 176 | rebasing 2:dc0947a82db8 "C" (C) |
|
177 | 177 | rebasing 3:e7b3f00ed42e "D" (D) |
|
178 | 178 | rebasing 4:69a34c08022a "E" (E tip) |
|
179 | 179 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/dc0947a82db8-3eefec98-rebase.hg (glob) |
|
180 | 180 | |
|
181 | 181 | $ hg tglog |
|
182 | o 4: 'E' | |
|
182 | o 4: e3d0c70d606d 'E' | |
|
183 | 183 | | |
|
184 | o 3: 'D' | |
|
184 | o 3: e9153d36a1af 'D' | |
|
185 | 185 | | |
|
186 | o 2: 'C' | |
|
186 | o 2: a7ac28b870a8 'C' | |
|
187 | 187 | | |
|
188 | o 1: 'B' | |
|
188 | o 1: fc2b737bb2e5 'B' | |
|
189 | 189 | |
|
190 | o 0: 'A' | |
|
190 | o 0: 426bada5c675 'A' | |
|
191 | 191 | |
|
192 | 192 | $ hg rebase -d 1 -s 3 |
|
193 | 193 | rebasing 3:e9153d36a1af "D" |
|
194 | 194 | rebasing 4:e3d0c70d606d "E" (tip) |
|
195 | 195 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/e9153d36a1af-db7388ed-rebase.hg (glob) |
|
196 | 196 | $ hg tglog |
|
197 | o 4: 'E' | |
|
197 | o 4: 2c24e540eccd 'E' | |
|
198 | 198 | | |
|
199 | o 3: 'D' | |
|
199 | o 3: 73f786ed52ff 'D' | |
|
200 | 200 | | |
|
201 | | o 2: 'C' | |
|
201 | | o 2: a7ac28b870a8 'C' | |
|
202 | 202 | |/ |
|
203 | o 1: 'B' | |
|
203 | o 1: fc2b737bb2e5 'B' | |
|
204 | 204 | |
|
205 | o 0: 'A' | |
|
205 | o 0: 426bada5c675 'A' | |
|
206 | 206 | |
|
207 | 207 | $ cd .. |
|
208 | 208 | |
|
209 | 209 | Verify that target is not selected as external rev (issue3085) |
|
210 | 210 | |
|
211 | 211 | $ hg init a6 |
|
212 | 212 | $ cd a6 |
|
213 | 213 | |
|
214 | 214 | $ hg debugdrawdag <<EOF |
|
215 | 215 | > H |
|
216 | 216 | > | G |
|
217 | 217 | > |/| |
|
218 | 218 | > F E |
|
219 | 219 | > |/ |
|
220 | 220 | > A |
|
221 | 221 | > EOF |
|
222 | 222 | $ hg up -q G |
|
223 | 223 | |
|
224 | 224 | $ echo "I" >> E |
|
225 | 225 | $ hg ci -m "I" |
|
226 | 226 | $ hg tag --local I |
|
227 | 227 | $ hg merge H |
|
228 | 228 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
229 | 229 | (branch merge, don't forget to commit) |
|
230 | 230 | $ hg ci -m "Merge" |
|
231 | 231 | $ echo "J" >> F |
|
232 | 232 | $ hg ci -m "J" |
|
233 | 233 | $ hg tglog |
|
234 | @ 7: 'J' | |
|
234 | @ 7: c6aaf0d259c0 'J' | |
|
235 | 235 | | |
|
236 | o 6: 'Merge' | |
|
236 | o 6: 0cfbc7e8faaf 'Merge' | |
|
237 | 237 | |\ |
|
238 | | o 5: 'I' | |
|
238 | | o 5: b92d164ad3cb 'I' | |
|
239 | 239 | | | |
|
240 | o | 4: 'H' | |
|
240 | o | 4: 4ea5b230dea3 'H' | |
|
241 | 241 | | | |
|
242 | | o 3: 'G' | |
|
242 | | o 3: c6001eacfde5 'G' | |
|
243 | 243 | |/| |
|
244 | o | 2: 'F' | |
|
244 | o | 2: 8908a377a434 'F' | |
|
245 | 245 | | | |
|
246 | | o 1: 'E' | |
|
246 | | o 1: 7fb047a69f22 'E' | |
|
247 | 247 | |/ |
|
248 | o 0: 'A' | |
|
248 | o 0: 426bada5c675 'A' | |
|
249 | 249 | |
|
250 | 250 | $ hg rebase -s I -d H --collapse --config ui.merge=internal:other |
|
251 | 251 | rebasing 5:b92d164ad3cb "I" (I) |
|
252 | 252 | rebasing 6:0cfbc7e8faaf "Merge" |
|
253 | 253 | rebasing 7:c6aaf0d259c0 "J" (tip) |
|
254 | 254 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/b92d164ad3cb-88fd7ab7-rebase.hg (glob) |
|
255 | 255 | |
|
256 | 256 | $ hg tglog |
|
257 | @ 5: 'Collapsed revision | |
|
257 | @ 5: 65079693dac4 'Collapsed revision | |
|
258 | 258 | | * I |
|
259 | 259 | | * Merge |
|
260 | 260 | | * J' |
|
261 | o 4: 'H' | |
|
261 | o 4: 4ea5b230dea3 'H' | |
|
262 | 262 | | |
|
263 | | o 3: 'G' | |
|
263 | | o 3: c6001eacfde5 'G' | |
|
264 | 264 | |/| |
|
265 | o | 2: 'F' | |
|
265 | o | 2: 8908a377a434 'F' | |
|
266 | 266 | | | |
|
267 | | o 1: 'E' | |
|
267 | | o 1: 7fb047a69f22 'E' | |
|
268 | 268 | |/ |
|
269 | o 0: 'A' | |
|
269 | o 0: 426bada5c675 'A' | |
|
270 | 270 | |
|
271 | 271 | |
|
272 | 272 | $ hg log --rev tip |
|
273 | 273 | changeset: 5:65079693dac4 |
|
274 | 274 | tag: tip |
|
275 | 275 | user: test |
|
276 | 276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
277 | 277 | summary: Collapsed revision |
|
278 | 278 | |
|
279 | 279 | |
|
280 | 280 | $ cd .. |
|
281 | 281 | |
|
282 | 282 | Ensure --continue restores a correct state (issue3046) and phase: |
|
283 | 283 | $ hg init a7 |
|
284 | 284 | $ cd a7 |
|
285 | 285 | |
|
286 | 286 | $ hg debugdrawdag <<EOF |
|
287 | 287 | > C B |
|
288 | 288 | > |/ |
|
289 | 289 | > A |
|
290 | 290 | > EOF |
|
291 | 291 | $ hg up -q C |
|
292 | 292 | $ echo 'B2' > B |
|
293 | 293 | $ hg ci -A -m 'B2' |
|
294 | 294 | adding B |
|
295 | 295 | $ hg phase --force --secret . |
|
296 | 296 | $ hg rebase -s . -d B --config ui.merge=internal:fail |
|
297 | 297 | rebasing 3:17b4880d2402 "B2" (tip) |
|
298 | 298 | merging B |
|
299 | 299 | warning: conflicts while merging B! (edit, then use 'hg resolve --mark') |
|
300 | 300 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
301 | 301 | [1] |
|
302 | 302 | $ hg resolve --all -t internal:local |
|
303 | 303 | (no more unresolved files) |
|
304 | 304 | continue: hg rebase --continue |
|
305 | 305 | $ hg rebase -c |
|
306 | 306 | rebasing 3:17b4880d2402 "B2" (tip) |
|
307 | 307 | note: rebase of 3:17b4880d2402 created no changes to commit |
|
308 | 308 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/17b4880d2402-1ae1f6cc-rebase.hg (glob) |
|
309 | 309 | $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n" |
|
310 | 310 | o 2:draft 'C' |
|
311 | 311 | | |
|
312 | 312 | | @ 1:draft 'B' |
|
313 | 313 | |/ |
|
314 | 314 | o 0:draft 'A' |
|
315 | 315 | |
|
316 | 316 | |
|
317 | 317 | $ cd .. |
@@ -1,465 +1,465 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [phases] |
|
6 | 6 | > publish=False |
|
7 | 7 | > |
|
8 | 8 | > [alias] |
|
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
10 | > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n" | |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
10 | > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n" | |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | |
|
17 | 17 | $ echo A > A |
|
18 | 18 | $ hg ci -Am A |
|
19 | 19 | adding A |
|
20 | 20 | |
|
21 | 21 | $ echo B > B |
|
22 | 22 | $ hg ci -Am B |
|
23 | 23 | adding B |
|
24 | 24 | |
|
25 | 25 | $ echo C >> A |
|
26 | 26 | $ hg ci -m C |
|
27 | 27 | |
|
28 | 28 | $ hg up -q -C 0 |
|
29 | 29 | |
|
30 | 30 | $ echo D >> A |
|
31 | 31 | $ hg ci -m D |
|
32 | 32 | created new head |
|
33 | 33 | |
|
34 | 34 | $ echo E > E |
|
35 | 35 | $ hg ci -Am E |
|
36 | 36 | adding E |
|
37 | 37 | |
|
38 | 38 | $ cd .. |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | Changes during an interruption - continue: |
|
42 | 42 | |
|
43 | 43 | $ hg clone -q -u . a a1 |
|
44 | 44 | $ cd a1 |
|
45 | 45 | |
|
46 | 46 | $ hg tglog |
|
47 | @ 4: 'E' | |
|
47 | @ 4: ae36e8e3dfd7 'E' | |
|
48 | 48 | | |
|
49 | o 3: 'D' | |
|
49 | o 3: 46b37eabc604 'D' | |
|
50 | 50 | | |
|
51 | | o 2: 'C' | |
|
51 | | o 2: 965c486023db 'C' | |
|
52 | 52 | | | |
|
53 | | o 1: 'B' | |
|
53 | | o 1: 27547f69f254 'B' | |
|
54 | 54 | |/ |
|
55 | o 0: 'A' | |
|
55 | o 0: 4a2df7238c3b 'A' | |
|
56 | 56 | |
|
57 | 57 | Rebasing B onto E: |
|
58 | 58 | |
|
59 | 59 | $ hg rebase -s 1 -d 4 |
|
60 | 60 | rebasing 1:27547f69f254 "B" |
|
61 | 61 | rebasing 2:965c486023db "C" |
|
62 | 62 | merging A |
|
63 | 63 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
64 | 64 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
65 | 65 | [1] |
|
66 | 66 | |
|
67 | 67 | Force a commit on C during the interruption: |
|
68 | 68 | |
|
69 | 69 | $ hg up -q -C 2 --config 'extensions.rebase=!' |
|
70 | 70 | |
|
71 | 71 | $ echo 'Extra' > Extra |
|
72 | 72 | $ hg add Extra |
|
73 | 73 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' |
|
74 | 74 | |
|
75 | 75 | Force this commit onto secret phase |
|
76 | 76 | |
|
77 | 77 | $ hg phase --force --secret 6 |
|
78 | 78 | |
|
79 | 79 | $ hg tglogp |
|
80 | @ 6:secret 'Extra' | |
|
80 | @ 6: deb5d2f93d8b secret 'Extra' | |
|
81 | 81 | | |
|
82 | | o 5:draft 'B' | |
|
82 | | o 5: 45396c49d53b draft 'B' | |
|
83 | 83 | | | |
|
84 | | o 4:draft 'E' | |
|
84 | | o 4: ae36e8e3dfd7 draft 'E' | |
|
85 | 85 | | | |
|
86 | | o 3:draft 'D' | |
|
86 | | o 3: 46b37eabc604 draft 'D' | |
|
87 | 87 | | | |
|
88 | o | 2:draft 'C' | |
|
88 | o | 2: 965c486023db draft 'C' | |
|
89 | 89 | | | |
|
90 | o | 1:draft 'B' | |
|
90 | o | 1: 27547f69f254 draft 'B' | |
|
91 | 91 | |/ |
|
92 | o 0:draft 'A' | |
|
92 | o 0: 4a2df7238c3b draft 'A' | |
|
93 | 93 | |
|
94 | 94 | Resume the rebasing: |
|
95 | 95 | |
|
96 | 96 | $ hg rebase --continue |
|
97 | 97 | already rebased 1:27547f69f254 "B" as 45396c49d53b |
|
98 | 98 | rebasing 2:965c486023db "C" |
|
99 | 99 | merging A |
|
100 | 100 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
101 | 101 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
102 | 102 | [1] |
|
103 | 103 | |
|
104 | 104 | Solve the conflict and go on: |
|
105 | 105 | |
|
106 | 106 | $ echo 'conflict solved' > A |
|
107 | 107 | $ rm A.orig |
|
108 | 108 | $ hg resolve -m A |
|
109 | 109 | (no more unresolved files) |
|
110 | 110 | continue: hg rebase --continue |
|
111 | 111 | |
|
112 | 112 | $ hg rebase --continue |
|
113 | 113 | already rebased 1:27547f69f254 "B" as 45396c49d53b |
|
114 | 114 | rebasing 2:965c486023db "C" |
|
115 | 115 | warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db |
|
116 | 116 | |
|
117 | 117 | $ hg tglogp |
|
118 | o 7:draft 'C' | |
|
118 | o 7: d2d25e26288e draft 'C' | |
|
119 | 119 | | |
|
120 | | o 6:secret 'Extra' | |
|
120 | | o 6: deb5d2f93d8b secret 'Extra' | |
|
121 | 121 | | | |
|
122 | o | 5:draft 'B' | |
|
122 | o | 5: 45396c49d53b draft 'B' | |
|
123 | 123 | | | |
|
124 | @ | 4:draft 'E' | |
|
124 | @ | 4: ae36e8e3dfd7 draft 'E' | |
|
125 | 125 | | | |
|
126 | o | 3:draft 'D' | |
|
126 | o | 3: 46b37eabc604 draft 'D' | |
|
127 | 127 | | | |
|
128 | | o 2:draft 'C' | |
|
128 | | o 2: 965c486023db draft 'C' | |
|
129 | 129 | | | |
|
130 | | o 1:draft 'B' | |
|
130 | | o 1: 27547f69f254 draft 'B' | |
|
131 | 131 | |/ |
|
132 | o 0:draft 'A' | |
|
132 | o 0: 4a2df7238c3b draft 'A' | |
|
133 | 133 | |
|
134 | 134 | $ cd .. |
|
135 | 135 | |
|
136 | 136 | |
|
137 | 137 | Changes during an interruption - abort: |
|
138 | 138 | |
|
139 | 139 | $ hg clone -q -u . a a2 |
|
140 | 140 | $ cd a2 |
|
141 | 141 | |
|
142 | 142 | $ hg tglog |
|
143 | @ 4: 'E' | |
|
143 | @ 4: ae36e8e3dfd7 'E' | |
|
144 | 144 | | |
|
145 | o 3: 'D' | |
|
145 | o 3: 46b37eabc604 'D' | |
|
146 | 146 | | |
|
147 | | o 2: 'C' | |
|
147 | | o 2: 965c486023db 'C' | |
|
148 | 148 | | | |
|
149 | | o 1: 'B' | |
|
149 | | o 1: 27547f69f254 'B' | |
|
150 | 150 | |/ |
|
151 | o 0: 'A' | |
|
151 | o 0: 4a2df7238c3b 'A' | |
|
152 | 152 | |
|
153 | 153 | Rebasing B onto E: |
|
154 | 154 | |
|
155 | 155 | $ hg rebase -s 1 -d 4 |
|
156 | 156 | rebasing 1:27547f69f254 "B" |
|
157 | 157 | rebasing 2:965c486023db "C" |
|
158 | 158 | merging A |
|
159 | 159 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
160 | 160 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
161 | 161 | [1] |
|
162 | 162 | |
|
163 | 163 | Force a commit on B' during the interruption: |
|
164 | 164 | |
|
165 | 165 | $ hg up -q -C 5 --config 'extensions.rebase=!' |
|
166 | 166 | |
|
167 | 167 | $ echo 'Extra' > Extra |
|
168 | 168 | $ hg add Extra |
|
169 | 169 | $ hg ci -m 'Extra' --config 'extensions.rebase=!' |
|
170 | 170 | |
|
171 | 171 | $ hg tglog |
|
172 | @ 6: 'Extra' | |
|
172 | @ 6: 402ee3642b59 'Extra' | |
|
173 | 173 | | |
|
174 | o 5: 'B' | |
|
174 | o 5: 45396c49d53b 'B' | |
|
175 | 175 | | |
|
176 | o 4: 'E' | |
|
176 | o 4: ae36e8e3dfd7 'E' | |
|
177 | 177 | | |
|
178 | o 3: 'D' | |
|
178 | o 3: 46b37eabc604 'D' | |
|
179 | 179 | | |
|
180 | | o 2: 'C' | |
|
180 | | o 2: 965c486023db 'C' | |
|
181 | 181 | | | |
|
182 | | o 1: 'B' | |
|
182 | | o 1: 27547f69f254 'B' | |
|
183 | 183 | |/ |
|
184 | o 0: 'A' | |
|
184 | o 0: 4a2df7238c3b 'A' | |
|
185 | 185 | |
|
186 | 186 | Abort the rebasing: |
|
187 | 187 | |
|
188 | 188 | $ hg rebase --abort |
|
189 | 189 | warning: new changesets detected on destination branch, can't strip |
|
190 | 190 | rebase aborted |
|
191 | 191 | |
|
192 | 192 | $ hg tglog |
|
193 | @ 6: 'Extra' | |
|
193 | @ 6: 402ee3642b59 'Extra' | |
|
194 | 194 | | |
|
195 | o 5: 'B' | |
|
195 | o 5: 45396c49d53b 'B' | |
|
196 | 196 | | |
|
197 | o 4: 'E' | |
|
197 | o 4: ae36e8e3dfd7 'E' | |
|
198 | 198 | | |
|
199 | o 3: 'D' | |
|
199 | o 3: 46b37eabc604 'D' | |
|
200 | 200 | | |
|
201 | | o 2: 'C' | |
|
201 | | o 2: 965c486023db 'C' | |
|
202 | 202 | | | |
|
203 | | o 1: 'B' | |
|
203 | | o 1: 27547f69f254 'B' | |
|
204 | 204 | |/ |
|
205 | o 0: 'A' | |
|
205 | o 0: 4a2df7238c3b 'A' | |
|
206 | 206 | |
|
207 | 207 | $ cd .. |
|
208 | 208 | |
|
209 | 209 | Changes during an interruption - abort (again): |
|
210 | 210 | |
|
211 | 211 | $ hg clone -q -u . a a3 |
|
212 | 212 | $ cd a3 |
|
213 | 213 | |
|
214 | 214 | $ hg tglogp |
|
215 | @ 4:draft 'E' | |
|
215 | @ 4: ae36e8e3dfd7 draft 'E' | |
|
216 | 216 | | |
|
217 | o 3:draft 'D' | |
|
217 | o 3: 46b37eabc604 draft 'D' | |
|
218 | 218 | | |
|
219 | | o 2:draft 'C' | |
|
219 | | o 2: 965c486023db draft 'C' | |
|
220 | 220 | | | |
|
221 | | o 1:draft 'B' | |
|
221 | | o 1: 27547f69f254 draft 'B' | |
|
222 | 222 | |/ |
|
223 | o 0:draft 'A' | |
|
223 | o 0: 4a2df7238c3b draft 'A' | |
|
224 | 224 | |
|
225 | 225 | Rebasing B onto E: |
|
226 | 226 | |
|
227 | 227 | $ hg rebase -s 1 -d 4 |
|
228 | 228 | rebasing 1:27547f69f254 "B" |
|
229 | 229 | rebasing 2:965c486023db "C" |
|
230 | 230 | merging A |
|
231 | 231 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') |
|
232 | 232 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
233 | 233 | [1] |
|
234 | 234 | |
|
235 | 235 | Change phase on B and B' |
|
236 | 236 | |
|
237 | 237 | $ hg up -q -C 5 --config 'extensions.rebase=!' |
|
238 | 238 | $ hg phase --public 1 |
|
239 | 239 | $ hg phase --public 5 |
|
240 | 240 | $ hg phase --secret -f 2 |
|
241 | 241 | |
|
242 | 242 | $ hg tglogp |
|
243 | @ 5:public 'B' | |
|
243 | @ 5: 45396c49d53b public 'B' | |
|
244 | 244 | | |
|
245 | o 4:public 'E' | |
|
245 | o 4: ae36e8e3dfd7 public 'E' | |
|
246 | 246 | | |
|
247 | o 3:public 'D' | |
|
247 | o 3: 46b37eabc604 public 'D' | |
|
248 | 248 | | |
|
249 | | o 2:secret 'C' | |
|
249 | | o 2: 965c486023db secret 'C' | |
|
250 | 250 | | | |
|
251 | | o 1:public 'B' | |
|
251 | | o 1: 27547f69f254 public 'B' | |
|
252 | 252 | |/ |
|
253 | o 0:public 'A' | |
|
253 | o 0: 4a2df7238c3b public 'A' | |
|
254 | 254 | |
|
255 | 255 | Abort the rebasing: |
|
256 | 256 | |
|
257 | 257 | $ hg rebase --abort |
|
258 | 258 | warning: can't clean up public changesets 45396c49d53b |
|
259 | 259 | rebase aborted |
|
260 | 260 | |
|
261 | 261 | $ hg tglogp |
|
262 | @ 5:public 'B' | |
|
262 | @ 5: 45396c49d53b public 'B' | |
|
263 | 263 | | |
|
264 | o 4:public 'E' | |
|
264 | o 4: ae36e8e3dfd7 public 'E' | |
|
265 | 265 | | |
|
266 | o 3:public 'D' | |
|
266 | o 3: 46b37eabc604 public 'D' | |
|
267 | 267 | | |
|
268 | | o 2:secret 'C' | |
|
268 | | o 2: 965c486023db secret 'C' | |
|
269 | 269 | | | |
|
270 | | o 1:public 'B' | |
|
270 | | o 1: 27547f69f254 public 'B' | |
|
271 | 271 | |/ |
|
272 | o 0:public 'A' | |
|
272 | o 0: 4a2df7238c3b public 'A' | |
|
273 | 273 | |
|
274 | 274 | Test rebase interrupted by hooks |
|
275 | 275 | |
|
276 | 276 | $ hg up 2 |
|
277 | 277 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
278 | 278 | $ echo F > F |
|
279 | 279 | $ hg add F |
|
280 | 280 | $ hg ci -m F |
|
281 | 281 | |
|
282 | 282 | $ cd .. |
|
283 | 283 | |
|
284 | 284 | (precommit version) |
|
285 | 285 | |
|
286 | 286 | $ cp -R a3 hook-precommit |
|
287 | 287 | $ cd hook-precommit |
|
288 | 288 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"' |
|
289 | 289 | rebasing 2:965c486023db "C" |
|
290 | 290 | M A |
|
291 | 291 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
292 | 292 | abort: precommit hook exited with status 1 |
|
293 | 293 | [255] |
|
294 | 294 | $ hg tglogp |
|
295 | @ 7:secret 'C' | |
|
295 | @ 7: 401ccec5e39f secret 'C' | |
|
296 | 296 | | |
|
297 | | @ 6:secret 'F' | |
|
297 | | @ 6: a0b2430ebfb8 secret 'F' | |
|
298 | 298 | | | |
|
299 | o | 5:public 'B' | |
|
299 | o | 5: 45396c49d53b public 'B' | |
|
300 | 300 | | | |
|
301 | o | 4:public 'E' | |
|
301 | o | 4: ae36e8e3dfd7 public 'E' | |
|
302 | 302 | | | |
|
303 | o | 3:public 'D' | |
|
303 | o | 3: 46b37eabc604 public 'D' | |
|
304 | 304 | | | |
|
305 | | o 2:secret 'C' | |
|
305 | | o 2: 965c486023db secret 'C' | |
|
306 | 306 | | | |
|
307 | | o 1:public 'B' | |
|
307 | | o 1: 27547f69f254 public 'B' | |
|
308 | 308 | |/ |
|
309 | o 0:public 'A' | |
|
309 | o 0: 4a2df7238c3b public 'A' | |
|
310 | 310 | |
|
311 | 311 | $ hg rebase --continue |
|
312 | 312 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
313 | 313 | rebasing 6:a0b2430ebfb8 "F" |
|
314 | 314 | saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
315 | 315 | $ hg tglogp |
|
316 | @ 6:secret 'F' | |
|
316 | @ 6: 6e92a149ac6b secret 'F' | |
|
317 | 317 | | |
|
318 | o 5:secret 'C' | |
|
318 | o 5: 401ccec5e39f secret 'C' | |
|
319 | 319 | | |
|
320 | o 4:public 'B' | |
|
320 | o 4: 45396c49d53b public 'B' | |
|
321 | 321 | | |
|
322 | o 3:public 'E' | |
|
322 | o 3: ae36e8e3dfd7 public 'E' | |
|
323 | 323 | | |
|
324 | o 2:public 'D' | |
|
324 | o 2: 46b37eabc604 public 'D' | |
|
325 | 325 | | |
|
326 | | o 1:public 'B' | |
|
326 | | o 1: 27547f69f254 public 'B' | |
|
327 | 327 | |/ |
|
328 | o 0:public 'A' | |
|
328 | o 0: 4a2df7238c3b public 'A' | |
|
329 | 329 | |
|
330 | 330 | $ cd .. |
|
331 | 331 | |
|
332 | 332 | (pretxncommit version) |
|
333 | 333 | |
|
334 | 334 | $ cp -R a3 hook-pretxncommit |
|
335 | 335 | $ cd hook-pretxncommit |
|
336 | 336 | #if windows |
|
337 | 337 | $ NODE="%HG_NODE%" |
|
338 | 338 | #else |
|
339 | 339 | $ NODE="\$HG_NODE" |
|
340 | 340 | #endif |
|
341 | 341 | $ hg rebase --source 2 --dest 5 --tool internal:other --config "hooks.pretxncommit=hg log -r $NODE | grep \"summary: C\"" |
|
342 | 342 | rebasing 2:965c486023db "C" |
|
343 | 343 | summary: C |
|
344 | 344 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
345 | 345 | transaction abort! |
|
346 | 346 | rollback completed |
|
347 | 347 | abort: pretxncommit hook exited with status 1 |
|
348 | 348 | [255] |
|
349 | 349 | $ hg tglogp |
|
350 | @ 7:secret 'C' | |
|
350 | @ 7: 401ccec5e39f secret 'C' | |
|
351 | 351 | | |
|
352 | | @ 6:secret 'F' | |
|
352 | | @ 6: a0b2430ebfb8 secret 'F' | |
|
353 | 353 | | | |
|
354 | o | 5:public 'B' | |
|
354 | o | 5: 45396c49d53b public 'B' | |
|
355 | 355 | | | |
|
356 | o | 4:public 'E' | |
|
356 | o | 4: ae36e8e3dfd7 public 'E' | |
|
357 | 357 | | | |
|
358 | o | 3:public 'D' | |
|
358 | o | 3: 46b37eabc604 public 'D' | |
|
359 | 359 | | | |
|
360 | | o 2:secret 'C' | |
|
360 | | o 2: 965c486023db secret 'C' | |
|
361 | 361 | | | |
|
362 | | o 1:public 'B' | |
|
362 | | o 1: 27547f69f254 public 'B' | |
|
363 | 363 | |/ |
|
364 | o 0:public 'A' | |
|
364 | o 0: 4a2df7238c3b public 'A' | |
|
365 | 365 | |
|
366 | 366 | $ hg rebase --continue |
|
367 | 367 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
368 | 368 | rebasing 6:a0b2430ebfb8 "F" |
|
369 | 369 | saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
370 | 370 | $ hg tglogp |
|
371 | @ 6:secret 'F' | |
|
371 | @ 6: 6e92a149ac6b secret 'F' | |
|
372 | 372 | | |
|
373 | o 5:secret 'C' | |
|
373 | o 5: 401ccec5e39f secret 'C' | |
|
374 | 374 | | |
|
375 | o 4:public 'B' | |
|
375 | o 4: 45396c49d53b public 'B' | |
|
376 | 376 | | |
|
377 | o 3:public 'E' | |
|
377 | o 3: ae36e8e3dfd7 public 'E' | |
|
378 | 378 | | |
|
379 | o 2:public 'D' | |
|
379 | o 2: 46b37eabc604 public 'D' | |
|
380 | 380 | | |
|
381 | | o 1:public 'B' | |
|
381 | | o 1: 27547f69f254 public 'B' | |
|
382 | 382 | |/ |
|
383 | o 0:public 'A' | |
|
383 | o 0: 4a2df7238c3b public 'A' | |
|
384 | 384 | |
|
385 | 385 | $ cd .. |
|
386 | 386 | |
|
387 | 387 | (pretxnclose version) |
|
388 | 388 | |
|
389 | 389 | $ cp -R a3 hook-pretxnclose |
|
390 | 390 | $ cd hook-pretxnclose |
|
391 | 391 | $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary: C"' |
|
392 | 392 | rebasing 2:965c486023db "C" |
|
393 | 393 | summary: C |
|
394 | 394 | rebasing 6:a0b2430ebfb8 "F" (tip) |
|
395 | 395 | transaction abort! |
|
396 | 396 | rollback completed |
|
397 | 397 | abort: pretxnclose hook exited with status 1 |
|
398 | 398 | [255] |
|
399 | 399 | $ hg tglogp |
|
400 | @ 7:secret 'C' | |
|
400 | @ 7: 401ccec5e39f secret 'C' | |
|
401 | 401 | | |
|
402 | | @ 6:secret 'F' | |
|
402 | | @ 6: a0b2430ebfb8 secret 'F' | |
|
403 | 403 | | | |
|
404 | o | 5:public 'B' | |
|
404 | o | 5: 45396c49d53b public 'B' | |
|
405 | 405 | | | |
|
406 | o | 4:public 'E' | |
|
406 | o | 4: ae36e8e3dfd7 public 'E' | |
|
407 | 407 | | | |
|
408 | o | 3:public 'D' | |
|
408 | o | 3: 46b37eabc604 public 'D' | |
|
409 | 409 | | | |
|
410 | | o 2:secret 'C' | |
|
410 | | o 2: 965c486023db secret 'C' | |
|
411 | 411 | | | |
|
412 | | o 1:public 'B' | |
|
412 | | o 1: 27547f69f254 public 'B' | |
|
413 | 413 | |/ |
|
414 | o 0:public 'A' | |
|
414 | o 0: 4a2df7238c3b public 'A' | |
|
415 | 415 | |
|
416 | 416 | $ hg rebase --continue |
|
417 | 417 | already rebased 2:965c486023db "C" as 401ccec5e39f |
|
418 | 418 | rebasing 6:a0b2430ebfb8 "F" |
|
419 | 419 | saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg (glob) |
|
420 | 420 | $ hg tglogp |
|
421 | @ 6:secret 'F' | |
|
421 | @ 6: 6e92a149ac6b secret 'F' | |
|
422 | 422 | | |
|
423 | o 5:secret 'C' | |
|
423 | o 5: 401ccec5e39f secret 'C' | |
|
424 | 424 | | |
|
425 | o 4:public 'B' | |
|
425 | o 4: 45396c49d53b public 'B' | |
|
426 | 426 | | |
|
427 | o 3:public 'E' | |
|
427 | o 3: ae36e8e3dfd7 public 'E' | |
|
428 | 428 | | |
|
429 | o 2:public 'D' | |
|
429 | o 2: 46b37eabc604 public 'D' | |
|
430 | 430 | | |
|
431 | | o 1:public 'B' | |
|
431 | | o 1: 27547f69f254 public 'B' | |
|
432 | 432 | |/ |
|
433 | o 0:public 'A' | |
|
433 | o 0: 4a2df7238c3b public 'A' | |
|
434 | 434 | |
|
435 | 435 | $ cd .. |
|
436 | 436 | |
|
437 | 437 | Make sure merge state is cleaned up after a no-op rebase merge (issue5494) |
|
438 | 438 | $ hg init repo |
|
439 | 439 | $ cd repo |
|
440 | 440 | $ echo a > a |
|
441 | 441 | $ hg commit -qAm base |
|
442 | 442 | $ echo b >> a |
|
443 | 443 | $ hg commit -qm b |
|
444 | 444 | $ hg up '.^' |
|
445 | 445 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
446 | 446 | $ echo c >> a |
|
447 | 447 | $ hg commit -qm c |
|
448 | 448 | $ hg rebase -s 1 -d 2 --noninteractive |
|
449 | 449 | rebasing 1:fdaca8533b86 "b" |
|
450 | 450 | merging a |
|
451 | 451 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
452 | 452 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
453 | 453 | [1] |
|
454 | 454 | $ echo a > a |
|
455 | 455 | $ echo c >> a |
|
456 | 456 | $ hg resolve --mark a |
|
457 | 457 | (no more unresolved files) |
|
458 | 458 | continue: hg rebase --continue |
|
459 | 459 | $ hg rebase --continue |
|
460 | 460 | rebasing 1:fdaca8533b86 "b" |
|
461 | 461 | note: rebase of 1:fdaca8533b86 created no changes to commit |
|
462 | 462 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg (glob) |
|
463 | 463 | $ hg resolve --list |
|
464 | 464 | $ test -f .hg/merge |
|
465 | 465 | [1] |
@@ -1,130 +1,130 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [phases] |
|
6 | 6 | > publish=False |
|
7 | 7 | > |
|
8 | 8 | > [alias] |
|
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | |
|
13 | 13 | $ hg init a |
|
14 | 14 | $ cd a |
|
15 | 15 | |
|
16 | 16 | $ echo c1 > c1 |
|
17 | 17 | $ hg ci -Am c1 |
|
18 | 18 | adding c1 |
|
19 | 19 | |
|
20 | 20 | $ echo c2 > c2 |
|
21 | 21 | $ hg ci -Am c2 |
|
22 | 22 | adding c2 |
|
23 | 23 | |
|
24 | 24 | $ echo l1 > l1 |
|
25 | 25 | $ hg ci -Am l1 |
|
26 | 26 | adding l1 |
|
27 | 27 | |
|
28 | 28 | $ hg up -q -C 1 |
|
29 | 29 | |
|
30 | 30 | $ echo r1 > r1 |
|
31 | 31 | $ hg ci -Am r1 |
|
32 | 32 | adding r1 |
|
33 | 33 | created new head |
|
34 | 34 | |
|
35 | 35 | $ echo r2 > r2 |
|
36 | 36 | $ hg ci -Am r2 |
|
37 | 37 | adding r2 |
|
38 | 38 | |
|
39 | 39 | $ hg tglog |
|
40 | @ 4: 'r2' | |
|
40 | @ 4: 225af64d03e6 'r2' | |
|
41 | 41 | | |
|
42 | o 3: 'r1' | |
|
42 | o 3: 8d0a8c99b309 'r1' | |
|
43 | 43 | | |
|
44 | | o 2: 'l1' | |
|
44 | | o 2: 87c180a611f2 'l1' | |
|
45 | 45 | |/ |
|
46 | o 1: 'c2' | |
|
46 | o 1: 56daeba07f4b 'c2' | |
|
47 | 47 | | |
|
48 | o 0: 'c1' | |
|
48 | o 0: e8faad3d03ff 'c1' | |
|
49 | 49 | |
|
50 | 50 | Rebase with no arguments - single revision in source branch: |
|
51 | 51 | |
|
52 | 52 | $ hg up -q -C 2 |
|
53 | 53 | |
|
54 | 54 | $ hg rebase |
|
55 | 55 | rebasing 2:87c180a611f2 "l1" |
|
56 | 56 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-a5be192d-rebase.hg (glob) |
|
57 | 57 | |
|
58 | 58 | $ hg tglog |
|
59 | @ 4: 'l1' | |
|
59 | @ 4: b1152cc99655 'l1' | |
|
60 | 60 | | |
|
61 | o 3: 'r2' | |
|
61 | o 3: 225af64d03e6 'r2' | |
|
62 | 62 | | |
|
63 | o 2: 'r1' | |
|
63 | o 2: 8d0a8c99b309 'r1' | |
|
64 | 64 | | |
|
65 | o 1: 'c2' | |
|
65 | o 1: 56daeba07f4b 'c2' | |
|
66 | 66 | | |
|
67 | o 0: 'c1' | |
|
67 | o 0: e8faad3d03ff 'c1' | |
|
68 | 68 | |
|
69 | 69 | $ cd .. |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | $ hg init b |
|
73 | 73 | $ cd b |
|
74 | 74 | |
|
75 | 75 | $ echo c1 > c1 |
|
76 | 76 | $ hg ci -Am c1 |
|
77 | 77 | adding c1 |
|
78 | 78 | |
|
79 | 79 | $ echo c2 > c2 |
|
80 | 80 | $ hg ci -Am c2 |
|
81 | 81 | adding c2 |
|
82 | 82 | |
|
83 | 83 | $ echo l1 > l1 |
|
84 | 84 | $ hg ci -Am l1 |
|
85 | 85 | adding l1 |
|
86 | 86 | |
|
87 | 87 | $ echo l2 > l2 |
|
88 | 88 | $ hg ci -Am l2 |
|
89 | 89 | adding l2 |
|
90 | 90 | |
|
91 | 91 | $ hg up -q -C 1 |
|
92 | 92 | |
|
93 | 93 | $ echo r1 > r1 |
|
94 | 94 | $ hg ci -Am r1 |
|
95 | 95 | adding r1 |
|
96 | 96 | created new head |
|
97 | 97 | |
|
98 | 98 | $ hg tglog |
|
99 | @ 4: 'r1' | |
|
99 | @ 4: 8d0a8c99b309 'r1' | |
|
100 | 100 | | |
|
101 | | o 3: 'l2' | |
|
101 | | o 3: 1ac923b736ef 'l2' | |
|
102 | 102 | | | |
|
103 | | o 2: 'l1' | |
|
103 | | o 2: 87c180a611f2 'l1' | |
|
104 | 104 | |/ |
|
105 | o 1: 'c2' | |
|
105 | o 1: 56daeba07f4b 'c2' | |
|
106 | 106 | | |
|
107 | o 0: 'c1' | |
|
107 | o 0: e8faad3d03ff 'c1' | |
|
108 | 108 | |
|
109 | 109 | Rebase with no arguments - single revision in target branch: |
|
110 | 110 | |
|
111 | 111 | $ hg up -q -C 3 |
|
112 | 112 | |
|
113 | 113 | $ hg rebase |
|
114 | 114 | rebasing 2:87c180a611f2 "l1" |
|
115 | 115 | rebasing 3:1ac923b736ef "l2" |
|
116 | 116 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-b980535c-rebase.hg (glob) |
|
117 | 117 | |
|
118 | 118 | $ hg tglog |
|
119 | @ 4: 'l2' | |
|
119 | @ 4: 023181307ed0 'l2' | |
|
120 | 120 | | |
|
121 | o 3: 'l1' | |
|
121 | o 3: 913ab52b43b4 'l1' | |
|
122 | 122 | | |
|
123 | o 2: 'r1' | |
|
123 | o 2: 8d0a8c99b309 'r1' | |
|
124 | 124 | | |
|
125 | o 1: 'c2' | |
|
125 | o 1: 56daeba07f4b 'c2' | |
|
126 | 126 | | |
|
127 | o 0: 'c1' | |
|
127 | o 0: e8faad3d03ff 'c1' | |
|
128 | 128 | |
|
129 | 129 | |
|
130 | 130 | $ cd .. |
@@ -1,191 +1,191 b'' | |||
|
1 | 1 | This emulates the effects of an hg pull --rebase in which the remote repo |
|
2 | 2 | already has one local mq patch |
|
3 | 3 | |
|
4 | 4 | $ cat >> $HGRCPATH <<EOF |
|
5 | 5 | > [format] |
|
6 | 6 | > usegeneraldelta=yes |
|
7 | 7 | > [extensions] |
|
8 | 8 | > rebase= |
|
9 | 9 | > mq= |
|
10 | 10 | > |
|
11 | 11 | > [phases] |
|
12 | 12 | > publish=False |
|
13 | 13 | > |
|
14 | 14 | > [alias] |
|
15 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
|
15 | > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n" | |
|
16 | 16 | > EOF |
|
17 | 17 | |
|
18 | 18 | |
|
19 | 19 | $ hg init a |
|
20 | 20 | $ cd a |
|
21 | 21 | $ hg qinit -c |
|
22 | 22 | |
|
23 | 23 | $ echo c1 > c1 |
|
24 | 24 | $ hg add c1 |
|
25 | 25 | $ hg ci -m C1 |
|
26 | 26 | |
|
27 | 27 | $ echo r1 > r1 |
|
28 | 28 | $ hg add r1 |
|
29 | 29 | $ hg ci -m R1 |
|
30 | 30 | |
|
31 | 31 | $ hg up -q 0 |
|
32 | 32 | |
|
33 | 33 | $ hg qnew p0.patch -d '1 0' |
|
34 | 34 | $ echo p0 > p0 |
|
35 | 35 | $ hg add p0 |
|
36 | 36 | $ hg qref -m P0 |
|
37 | 37 | |
|
38 | 38 | $ hg qnew p1.patch -d '2 0' |
|
39 | 39 | $ echo p1 > p1 |
|
40 | 40 | $ hg add p1 |
|
41 | 41 | $ hg qref -m P1 |
|
42 | 42 | |
|
43 | 43 | $ hg export qtip > p1.patch |
|
44 | 44 | |
|
45 | 45 | $ hg up -q -C 1 |
|
46 | 46 | |
|
47 | 47 | $ hg import p1.patch |
|
48 | 48 | applying p1.patch |
|
49 | 49 | |
|
50 | 50 | $ rm p1.patch |
|
51 | 51 | |
|
52 | 52 | $ hg up -q -C qtip |
|
53 | 53 | |
|
54 | 54 | $ hg rebase -v |
|
55 | 55 | rebasing 2:13a46ce44f60 "P0" (p0.patch qbase) |
|
56 | 56 | resolving manifests |
|
57 | 57 | removing p0 |
|
58 | 58 | getting r1 |
|
59 | 59 | resolving manifests |
|
60 | 60 | getting p0 |
|
61 | 61 | committing files: |
|
62 | 62 | p0 |
|
63 | 63 | committing manifest |
|
64 | 64 | committing changelog |
|
65 | 65 | rebasing 3:148775c71080 "P1" (p1.patch qtip) |
|
66 | 66 | resolving manifests |
|
67 | 67 | note: rebase of 3:148775c71080 created no changes to commit |
|
68 | 68 | rebase merging completed |
|
69 | 69 | updating mq patch p0.patch to 5:9ecc820b1737 |
|
70 | 70 | $TESTTMP/a/.hg/patches/p0.patch (glob) |
|
71 | 71 | 2 changesets found |
|
72 | 72 | uncompressed size of bundle content: |
|
73 | 73 | 348 (changelog) |
|
74 | 74 | 324 (manifests) |
|
75 | 75 | 129 p0 |
|
76 | 76 | 129 p1 |
|
77 | 77 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-5da6ecfb-rebase.hg (glob) |
|
78 | 78 | 2 changesets found |
|
79 | 79 | uncompressed size of bundle content: |
|
80 | 80 | 403 (changelog) |
|
81 | 81 | 324 (manifests) |
|
82 | 82 | 129 p0 |
|
83 | 83 | 129 p1 |
|
84 | 84 | adding branch |
|
85 | 85 | adding changesets |
|
86 | 86 | adding manifests |
|
87 | 87 | adding file changes |
|
88 | 88 | added 2 changesets with 2 changes to 2 files |
|
89 | 89 | rebase completed |
|
90 | 90 | 1 revisions have been skipped |
|
91 | 91 | |
|
92 | 92 | $ hg tglog |
|
93 | @ 3: 'P0' tags: p0.patch qbase qtip tip | |
|
93 | @ 3: 9ecc820b1737 'P0' tags: p0.patch qbase qtip tip | |
|
94 | 94 | | |
|
95 | o 2: 'P1' tags: qparent | |
|
95 | o 2: 869d8b134a27 'P1' tags: qparent | |
|
96 | 96 | | |
|
97 | o 1: 'R1' tags: | |
|
97 | o 1: da108f2755df 'R1' tags: | |
|
98 | 98 | | |
|
99 | o 0: 'C1' tags: | |
|
99 | o 0: cd320d50b341 'C1' tags: | |
|
100 | 100 | |
|
101 | 101 | $ cd .. |
|
102 | 102 | |
|
103 | 103 | |
|
104 | 104 | $ hg init b |
|
105 | 105 | $ cd b |
|
106 | 106 | $ hg qinit -c |
|
107 | 107 | |
|
108 | 108 | $ for i in r0 r1 r2 r3 r4 r5 r6; |
|
109 | 109 | > do |
|
110 | 110 | > echo $i > $i |
|
111 | 111 | > hg ci -Am $i |
|
112 | 112 | > done |
|
113 | 113 | adding r0 |
|
114 | 114 | adding r1 |
|
115 | 115 | adding r2 |
|
116 | 116 | adding r3 |
|
117 | 117 | adding r4 |
|
118 | 118 | adding r5 |
|
119 | 119 | adding r6 |
|
120 | 120 | |
|
121 | 121 | $ hg qimport -r 1:tip |
|
122 | 122 | |
|
123 | 123 | $ hg up -q 0 |
|
124 | 124 | |
|
125 | 125 | $ for i in r1 r3 r7 r8; |
|
126 | 126 | > do |
|
127 | 127 | > echo $i > $i |
|
128 | 128 | > hg ci -Am branch2-$i |
|
129 | 129 | > done |
|
130 | 130 | adding r1 |
|
131 | 131 | created new head |
|
132 | 132 | adding r3 |
|
133 | 133 | adding r7 |
|
134 | 134 | adding r8 |
|
135 | 135 | |
|
136 | 136 | $ echo somethingelse > r4 |
|
137 | 137 | $ hg ci -Am branch2-r4 |
|
138 | 138 | adding r4 |
|
139 | 139 | |
|
140 | 140 | $ echo r6 > r6 |
|
141 | 141 | $ hg ci -Am branch2-r6 |
|
142 | 142 | adding r6 |
|
143 | 143 | |
|
144 | 144 | $ hg up -q qtip |
|
145 | 145 | |
|
146 | 146 | $ HGMERGE=internal:fail hg rebase |
|
147 | 147 | rebasing 1:b4bffa6e4776 "r1" (qbase r1) |
|
148 | 148 | note: rebase of 1:b4bffa6e4776 created no changes to commit |
|
149 | 149 | rebasing 2:c0fd129beb01 "r2" (r2) |
|
150 | 150 | rebasing 3:6ff5b8feed8e "r3" (r3) |
|
151 | 151 | note: rebase of 3:6ff5b8feed8e created no changes to commit |
|
152 | 152 | rebasing 4:094320fec554 "r4" (r4) |
|
153 | 153 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
154 | 154 | [1] |
|
155 | 155 | |
|
156 | 156 | $ HGMERGE=internal:local hg resolve --all |
|
157 | 157 | (no more unresolved files) |
|
158 | 158 | continue: hg rebase --continue |
|
159 | 159 | |
|
160 | 160 | $ hg rebase --continue |
|
161 | 161 | already rebased 1:b4bffa6e4776 "r1" (qbase r1) as 057f55ff8f44 |
|
162 | 162 | already rebased 2:c0fd129beb01 "r2" (r2) as 1660ab13ce9a |
|
163 | 163 | already rebased 3:6ff5b8feed8e "r3" (r3) as 1660ab13ce9a |
|
164 | 164 | rebasing 4:094320fec554 "r4" (r4) |
|
165 | 165 | note: rebase of 4:094320fec554 created no changes to commit |
|
166 | 166 | rebasing 5:681a378595ba "r5" (r5) |
|
167 | 167 | rebasing 6:512a1f24768b "r6" (qtip r6) |
|
168 | 168 | note: rebase of 6:512a1f24768b created no changes to commit |
|
169 | 169 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-b9bfb84d-rebase.hg (glob) |
|
170 | 170 | |
|
171 | 171 | $ hg tglog |
|
172 | @ 8: 'r5' tags: qtip r5 tip | |
|
172 | @ 8: 0b9735ce8f0a 'r5' tags: qtip r5 tip | |
|
173 | 173 | | |
|
174 | o 7: 'r2' tags: qbase r2 | |
|
174 | o 7: 1660ab13ce9a 'r2' tags: qbase r2 | |
|
175 | 175 | | |
|
176 | o 6: 'branch2-r6' tags: qparent | |
|
176 | o 6: 057f55ff8f44 'branch2-r6' tags: qparent | |
|
177 | 177 | | |
|
178 | o 5: 'branch2-r4' tags: | |
|
178 | o 5: 1d7287f8deb1 'branch2-r4' tags: | |
|
179 | 179 | | |
|
180 | o 4: 'branch2-r8' tags: | |
|
180 | o 4: 3c10b9db2bd5 'branch2-r8' tags: | |
|
181 | 181 | | |
|
182 | o 3: 'branch2-r7' tags: | |
|
182 | o 3: b684023158dc 'branch2-r7' tags: | |
|
183 | 183 | | |
|
184 | o 2: 'branch2-r3' tags: | |
|
184 | o 2: d817754b1251 'branch2-r3' tags: | |
|
185 | 185 | | |
|
186 | o 1: 'branch2-r1' tags: | |
|
186 | o 1: 0621a206f8a4 'branch2-r1' tags: | |
|
187 | 187 | | |
|
188 | o 0: 'r0' tags: | |
|
188 | o 0: 222799e2f90b 'r0' tags: | |
|
189 | 189 | |
|
190 | 190 | |
|
191 | 191 | $ cd .. |
@@ -1,360 +1,360 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > mq= |
|
5 | 5 | > |
|
6 | 6 | > [mq] |
|
7 | 7 | > plain=true |
|
8 | 8 | > |
|
9 | 9 | > [alias] |
|
10 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n" | |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | $ hg qinit -c |
|
17 | 17 | |
|
18 | 18 | $ echo c1 > f |
|
19 | 19 | $ hg add f |
|
20 | 20 | $ hg ci -m C1 |
|
21 | 21 | |
|
22 | 22 | $ echo r1 > f |
|
23 | 23 | $ hg ci -m R1 |
|
24 | 24 | |
|
25 | 25 | $ hg up -q 0 |
|
26 | 26 | |
|
27 | 27 | $ hg qnew f.patch -d '1 0' |
|
28 | 28 | $ echo mq1 > f |
|
29 | 29 | $ hg qref -m P0 |
|
30 | 30 | |
|
31 | 31 | $ hg qnew f2.patch |
|
32 | 32 | $ echo mq2 > f |
|
33 | 33 | $ hg qref -m P1 -d '2 0' |
|
34 | 34 | |
|
35 | 35 | $ hg tglog |
|
36 | @ 3: 'P1' tags: f2.patch qtip tip | |
|
36 | @ 3: 929394423cd3 'P1' tags: f2.patch qtip tip | |
|
37 | 37 | | |
|
38 | o 2: 'P0' tags: f.patch qbase | |
|
38 | o 2: 3504f44bffc0 'P0' tags: f.patch qbase | |
|
39 | 39 | | |
|
40 | | o 1: 'R1' tags: | |
|
40 | | o 1: bac9ed9960d8 'R1' tags: | |
|
41 | 41 | |/ |
|
42 | o 0: 'C1' tags: qparent | |
|
42 | o 0: 36f36ddbca61 'C1' tags: qparent | |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | Rebase - try to rebase on an applied mq patch: |
|
46 | 46 | |
|
47 | 47 | $ hg rebase -s 1 -d 3 |
|
48 | 48 | abort: cannot rebase onto an applied mq patch |
|
49 | 49 | [255] |
|
50 | 50 | |
|
51 | 51 | Rebase - same thing, but mq patch is default dest: |
|
52 | 52 | |
|
53 | 53 | $ hg up -q 1 |
|
54 | 54 | $ hg rebase |
|
55 | 55 | abort: cannot rebase onto an applied mq patch |
|
56 | 56 | [255] |
|
57 | 57 | $ hg up -q qtip |
|
58 | 58 | |
|
59 | 59 | Rebase - generate a conflict: |
|
60 | 60 | |
|
61 | 61 | $ hg rebase -s 2 -d 1 |
|
62 | 62 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) |
|
63 | 63 | merging f |
|
64 | 64 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
65 | 65 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
66 | 66 | [1] |
|
67 | 67 | |
|
68 | 68 | Fix the 1st conflict: |
|
69 | 69 | |
|
70 | 70 | $ echo mq1r1 > f |
|
71 | 71 | $ hg resolve -m f |
|
72 | 72 | (no more unresolved files) |
|
73 | 73 | continue: hg rebase --continue |
|
74 | 74 | $ hg rebase -c |
|
75 | 75 | rebasing 2:3504f44bffc0 "P0" (f.patch qbase) |
|
76 | 76 | rebasing 3:929394423cd3 "P1" (f2.patch qtip tip) |
|
77 | 77 | merging f |
|
78 | 78 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
79 | 79 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
80 | 80 | [1] |
|
81 | 81 | |
|
82 | 82 | Fix the 2nd conflict: |
|
83 | 83 | |
|
84 | 84 | $ echo mq1r1mq2 > f |
|
85 | 85 | $ hg resolve -m f |
|
86 | 86 | (no more unresolved files) |
|
87 | 87 | continue: hg rebase --continue |
|
88 | 88 | $ hg rebase -c |
|
89 | 89 | already rebased 2:3504f44bffc0 "P0" (f.patch qbase) as ebe9914c0d1c |
|
90 | 90 | rebasing 3:929394423cd3 "P1" (f2.patch qtip) |
|
91 | 91 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-30595b40-rebase.hg (glob) |
|
92 | 92 | |
|
93 | 93 | $ hg tglog |
|
94 | @ 3: 'P1' tags: f2.patch qtip tip | |
|
94 | @ 3: 462012cf340c 'P1' tags: f2.patch qtip tip | |
|
95 | 95 | | |
|
96 | o 2: 'P0' tags: f.patch qbase | |
|
96 | o 2: ebe9914c0d1c 'P0' tags: f.patch qbase | |
|
97 | 97 | | |
|
98 | o 1: 'R1' tags: qparent | |
|
98 | o 1: bac9ed9960d8 'R1' tags: qparent | |
|
99 | 99 | | |
|
100 | o 0: 'C1' tags: | |
|
100 | o 0: 36f36ddbca61 'C1' tags: | |
|
101 | 101 | |
|
102 | 102 | $ hg up -q qbase |
|
103 | 103 | |
|
104 | 104 | $ cat f |
|
105 | 105 | mq1r1 |
|
106 | 106 | |
|
107 | 107 | $ cat .hg/patches/f.patch |
|
108 | 108 | # HG changeset patch |
|
109 | 109 | # User test |
|
110 | 110 | # Date 1 0 |
|
111 | 111 | # Thu Jan 01 00:00:01 1970 +0000 |
|
112 | 112 | # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab |
|
113 | 113 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
114 | 114 | P0 |
|
115 | 115 | |
|
116 | 116 | diff -r bac9ed9960d8 -r ebe9914c0d1c f |
|
117 | 117 | --- a/f Thu Jan 01 00:00:00 1970 +0000 |
|
118 | 118 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
119 | 119 | @@ -1,1 +1,1 @@ |
|
120 | 120 | -r1 |
|
121 | 121 | +mq1r1 |
|
122 | 122 | |
|
123 | 123 | Update to qtip: |
|
124 | 124 | |
|
125 | 125 | $ hg up -q qtip |
|
126 | 126 | |
|
127 | 127 | $ cat f |
|
128 | 128 | mq1r1mq2 |
|
129 | 129 | |
|
130 | 130 | $ cat .hg/patches/f2.patch |
|
131 | 131 | # HG changeset patch |
|
132 | 132 | # User test |
|
133 | 133 | # Date 2 0 |
|
134 | 134 | # Thu Jan 01 00:00:02 1970 +0000 |
|
135 | 135 | # Node ID 462012cf340c97d44d62377c985a423f6bb82f07 |
|
136 | 136 | # Parent ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab |
|
137 | 137 | P1 |
|
138 | 138 | |
|
139 | 139 | diff -r ebe9914c0d1c -r 462012cf340c f |
|
140 | 140 | --- a/f Thu Jan 01 00:00:01 1970 +0000 |
|
141 | 141 | +++ b/f Thu Jan 01 00:00:02 1970 +0000 |
|
142 | 142 | @@ -1,1 +1,1 @@ |
|
143 | 143 | -mq1r1 |
|
144 | 144 | +mq1r1mq2 |
|
145 | 145 | |
|
146 | 146 | Adding one git-style patch and one normal: |
|
147 | 147 | |
|
148 | 148 | $ hg qpop -a |
|
149 | 149 | popping f2.patch |
|
150 | 150 | popping f.patch |
|
151 | 151 | patch queue now empty |
|
152 | 152 | |
|
153 | 153 | $ rm -fr .hg/patches |
|
154 | 154 | $ hg qinit -c |
|
155 | 155 | |
|
156 | 156 | $ hg up -q 0 |
|
157 | 157 | |
|
158 | 158 | $ hg qnew --git f_git.patch -d '3 0' |
|
159 | 159 | $ echo mq1 > p |
|
160 | 160 | $ hg add p |
|
161 | 161 | $ hg qref --git -m 'P0 (git)' |
|
162 | 162 | |
|
163 | 163 | $ hg qnew f.patch -d '4 0' |
|
164 | 164 | $ echo mq2 > p |
|
165 | 165 | $ hg qref -m P1 |
|
166 | 166 | $ hg qci -m 'save patch state' |
|
167 | 167 | |
|
168 | 168 | $ hg qseries -s |
|
169 | 169 | f_git.patch: P0 (git) |
|
170 | 170 | f.patch: P1 |
|
171 | 171 | |
|
172 | 172 | $ hg -R .hg/patches manifest |
|
173 | 173 | .hgignore |
|
174 | 174 | f.patch |
|
175 | 175 | f_git.patch |
|
176 | 176 | series |
|
177 | 177 | |
|
178 | 178 | $ cat .hg/patches/f_git.patch |
|
179 | 179 | Date: 3 0 |
|
180 | 180 | |
|
181 | 181 | P0 (git) |
|
182 | 182 | |
|
183 | 183 | diff --git a/p b/p |
|
184 | 184 | new file mode 100644 |
|
185 | 185 | --- /dev/null |
|
186 | 186 | +++ b/p |
|
187 | 187 | @@ -0,0 +1,1 @@ |
|
188 | 188 | +mq1 |
|
189 | 189 | |
|
190 | 190 | $ cat .hg/patches/f.patch |
|
191 | 191 | Date: 4 0 |
|
192 | 192 | |
|
193 | 193 | P1 |
|
194 | 194 | |
|
195 | 195 | diff -r ???????????? p (glob) |
|
196 | 196 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
197 | 197 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
198 | 198 | @@ -1,1 +1,1 @@ |
|
199 | 199 | -mq1 |
|
200 | 200 | +mq2 |
|
201 | 201 | |
|
202 | 202 | |
|
203 | 203 | Rebase the applied mq patches: |
|
204 | 204 | |
|
205 | 205 | $ hg rebase -s 2 -d 1 |
|
206 | 206 | rebasing 2:0c587ffcb480 "P0 (git)" (f_git.patch qbase) |
|
207 | 207 | rebasing 3:c7f18665e4bc "P1" (f.patch qtip tip) |
|
208 | 208 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-0ea5695f-rebase.hg (glob) |
|
209 | 209 | |
|
210 | 210 | $ hg qci -m 'save patch state' |
|
211 | 211 | |
|
212 | 212 | $ hg qseries -s |
|
213 | 213 | f_git.patch: P0 (git) |
|
214 | 214 | f.patch: P1 |
|
215 | 215 | |
|
216 | 216 | $ hg -R .hg/patches manifest |
|
217 | 217 | .hgignore |
|
218 | 218 | f.patch |
|
219 | 219 | f_git.patch |
|
220 | 220 | series |
|
221 | 221 | |
|
222 | 222 | $ cat .hg/patches/f_git.patch |
|
223 | 223 | # HG changeset patch |
|
224 | 224 | # User test |
|
225 | 225 | # Date 3 0 |
|
226 | 226 | # Thu Jan 01 00:00:03 1970 +0000 |
|
227 | 227 | # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837 |
|
228 | 228 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
229 | 229 | P0 (git) |
|
230 | 230 | |
|
231 | 231 | diff --git a/p b/p |
|
232 | 232 | new file mode 100644 |
|
233 | 233 | --- /dev/null |
|
234 | 234 | +++ b/p |
|
235 | 235 | @@ -0,0 +1,1 @@ |
|
236 | 236 | +mq1 |
|
237 | 237 | |
|
238 | 238 | $ cat .hg/patches/f.patch |
|
239 | 239 | # HG changeset patch |
|
240 | 240 | # User test |
|
241 | 241 | # Date 4 0 |
|
242 | 242 | # Thu Jan 01 00:00:04 1970 +0000 |
|
243 | 243 | # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557 |
|
244 | 244 | # Parent 12d9f6a3bbe560dee50c7c454d434add7fb8e837 |
|
245 | 245 | P1 |
|
246 | 246 | |
|
247 | 247 | diff -r 12d9f6a3bbe5 -r c77a2661c64c p |
|
248 | 248 | --- a/p Thu Jan 01 00:00:03 1970 +0000 |
|
249 | 249 | +++ b/p Thu Jan 01 00:00:04 1970 +0000 |
|
250 | 250 | @@ -1,1 +1,1 @@ |
|
251 | 251 | -mq1 |
|
252 | 252 | +mq2 |
|
253 | 253 | |
|
254 | 254 | $ cd .. |
|
255 | 255 | |
|
256 | 256 | Rebase with guards |
|
257 | 257 | |
|
258 | 258 | $ hg init foo |
|
259 | 259 | $ cd foo |
|
260 | 260 | $ echo a > a |
|
261 | 261 | $ hg ci -Am a |
|
262 | 262 | adding a |
|
263 | 263 | |
|
264 | 264 | Create mq repo with guarded patches foo and bar and empty patch: |
|
265 | 265 | |
|
266 | 266 | $ hg qinit |
|
267 | 267 | $ echo guarded > guarded |
|
268 | 268 | $ hg add guarded |
|
269 | 269 | $ hg qnew guarded |
|
270 | 270 | $ hg qnew empty-important -m 'important commit message' -d '1 0' |
|
271 | 271 | $ echo bar > bar |
|
272 | 272 | $ hg add bar |
|
273 | 273 | $ hg qnew bar -d '2 0' |
|
274 | 274 | $ echo foo > foo |
|
275 | 275 | $ hg add foo |
|
276 | 276 | $ hg qnew foo |
|
277 | 277 | $ hg qpop -a |
|
278 | 278 | popping foo |
|
279 | 279 | popping bar |
|
280 | 280 | popping empty-important |
|
281 | 281 | popping guarded |
|
282 | 282 | patch queue now empty |
|
283 | 283 | $ hg qguard guarded +guarded |
|
284 | 284 | $ hg qguard bar +baz |
|
285 | 285 | $ hg qguard foo +baz |
|
286 | 286 | $ hg qselect baz |
|
287 | 287 | number of unguarded, unapplied patches has changed from 1 to 3 |
|
288 | 288 | $ hg qpush bar |
|
289 | 289 | applying empty-important |
|
290 | 290 | patch empty-important is empty |
|
291 | 291 | applying bar |
|
292 | 292 | now at: bar |
|
293 | 293 | |
|
294 | 294 | $ hg qguard -l |
|
295 | 295 | guarded: +guarded |
|
296 | 296 | empty-important: unguarded |
|
297 | 297 | bar: +baz |
|
298 | 298 | foo: +baz |
|
299 | 299 | |
|
300 | 300 | $ hg tglog |
|
301 | @ 2: 'imported patch bar' tags: bar qtip tip | |
|
301 | @ 2: 4f44b861d38c 'imported patch bar' tags: bar qtip tip | |
|
302 | 302 | | |
|
303 | o 1: 'important commit message' tags: empty-important qbase | |
|
303 | o 1: 0aaf4c3af7eb 'important commit message' tags: empty-important qbase | |
|
304 | 304 | | |
|
305 | o 0: 'a' tags: qparent | |
|
305 | o 0: cb9a9f314b8b 'a' tags: qparent | |
|
306 | 306 | |
|
307 | 307 | Create new head to rebase bar onto: |
|
308 | 308 | |
|
309 | 309 | $ hg up -C 0 |
|
310 | 310 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
311 | 311 | $ echo b > b |
|
312 | 312 | $ hg add b |
|
313 | 313 | $ hg ci -m b |
|
314 | 314 | created new head |
|
315 | 315 | $ hg up -C 2 |
|
316 | 316 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
317 | 317 | $ echo a >> a |
|
318 | 318 | $ hg qref |
|
319 | 319 | |
|
320 | 320 | $ hg tglog |
|
321 | @ 3: '[mq]: bar' tags: bar qtip tip | |
|
321 | @ 3: d526d4536ed6 '[mq]: bar' tags: bar qtip tip | |
|
322 | 322 | | |
|
323 | | o 2: 'b' tags: | |
|
323 | | o 2: d2ae7f538514 'b' tags: | |
|
324 | 324 | | | |
|
325 | o | 1: 'important commit message' tags: empty-important qbase | |
|
325 | o | 1: 0aaf4c3af7eb 'important commit message' tags: empty-important qbase | |
|
326 | 326 | |/ |
|
327 | o 0: 'a' tags: qparent | |
|
327 | o 0: cb9a9f314b8b 'a' tags: qparent | |
|
328 | 328 | |
|
329 | 329 | |
|
330 | 330 | Rebase bar (make sure series order is preserved and empty-important also is |
|
331 | 331 | removed from the series): |
|
332 | 332 | |
|
333 | 333 | $ hg qseries |
|
334 | 334 | guarded |
|
335 | 335 | empty-important |
|
336 | 336 | bar |
|
337 | 337 | foo |
|
338 | 338 | $ [ -f .hg/patches/empty-important ] |
|
339 | 339 | $ hg -q rebase -d 2 |
|
340 | 340 | note: rebase of 1:0aaf4c3af7eb created no changes to commit |
|
341 | 341 | $ hg qseries |
|
342 | 342 | guarded |
|
343 | 343 | bar |
|
344 | 344 | foo |
|
345 | 345 | $ [ -f .hg/patches/empty-important ] |
|
346 | 346 | [1] |
|
347 | 347 | |
|
348 | 348 | $ hg qguard -l |
|
349 | 349 | guarded: +guarded |
|
350 | 350 | bar: +baz |
|
351 | 351 | foo: +baz |
|
352 | 352 | |
|
353 | 353 | $ hg tglog |
|
354 | @ 2: '[mq]: bar' tags: bar qbase qtip tip | |
|
354 | @ 2: 477d948bb2af '[mq]: bar' tags: bar qbase qtip tip | |
|
355 | 355 | | |
|
356 | o 1: 'b' tags: qparent | |
|
356 | o 1: d2ae7f538514 'b' tags: qparent | |
|
357 | 357 | | |
|
358 | o 0: 'a' tags: | |
|
358 | o 0: cb9a9f314b8b 'a' tags: | |
|
359 | 359 | |
|
360 | 360 | $ cd .. |
@@ -1,410 +1,410 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [phases] |
|
6 | 6 | > publish=False |
|
7 | 7 | > |
|
8 | 8 | > [alias] |
|
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | $ hg init a |
|
13 | 13 | $ cd a |
|
14 | 14 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
15 | 15 | adding changesets |
|
16 | 16 | adding manifests |
|
17 | 17 | adding file changes |
|
18 | 18 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
19 | 19 | new changesets cd010b8cd998:02de42196ebe |
|
20 | 20 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
21 | 21 | $ hg up tip |
|
22 | 22 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 23 | $ cd .. |
|
24 | 24 | |
|
25 | 25 | $ hg clone -q -u . a a1 |
|
26 | 26 | |
|
27 | 27 | $ cd a1 |
|
28 | 28 | |
|
29 | 29 | $ hg update 3 |
|
30 | 30 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
31 | 31 | $ hg branch dev-one |
|
32 | 32 | marked working directory as branch dev-one |
|
33 | 33 | (branches are permanent and global, did you want a bookmark?) |
|
34 | 34 | $ hg ci -m 'dev-one named branch' |
|
35 | 35 | |
|
36 | 36 | $ hg update 7 |
|
37 | 37 | 2 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
38 | 38 | $ hg branch dev-two |
|
39 | 39 | marked working directory as branch dev-two |
|
40 | 40 | |
|
41 | 41 | $ echo x > x |
|
42 | 42 | |
|
43 | 43 | $ hg add x |
|
44 | 44 | |
|
45 | 45 | $ hg ci -m 'dev-two named branch' |
|
46 | 46 | |
|
47 | 47 | $ hg tglog |
|
48 | @ 9: 'dev-two named branch' dev-two | |
|
48 | @ 9: cb039b7cae8e 'dev-two named branch' dev-two | |
|
49 | 49 | | |
|
50 | | o 8: 'dev-one named branch' dev-one | |
|
50 | | o 8: 643fc9128048 'dev-one named branch' dev-one | |
|
51 | 51 | | | |
|
52 | o | 7: 'H' | |
|
52 | o | 7: 02de42196ebe 'H' | |
|
53 | 53 | | | |
|
54 | +---o 6: 'G' | |
|
54 | +---o 6: eea13746799a 'G' | |
|
55 | 55 | | | | |
|
56 | o | | 5: 'F' | |
|
56 | o | | 5: 24b6387c8c8c 'F' | |
|
57 | 57 | | | | |
|
58 | +---o 4: 'E' | |
|
58 | +---o 4: 9520eea781bc 'E' | |
|
59 | 59 | | | |
|
60 | | o 3: 'D' | |
|
60 | | o 3: 32af7686d403 'D' | |
|
61 | 61 | | | |
|
62 | | o 2: 'C' | |
|
62 | | o 2: 5fddd98957c8 'C' | |
|
63 | 63 | | | |
|
64 | | o 1: 'B' | |
|
64 | | o 1: 42ccdea3bb16 'B' | |
|
65 | 65 | |/ |
|
66 | o 0: 'A' | |
|
66 | o 0: cd010b8cd998 'A' | |
|
67 | 67 | |
|
68 | 68 | |
|
69 | 69 | Branch name containing a dash (issue3181) |
|
70 | 70 | |
|
71 | 71 | $ hg rebase -b dev-two -d dev-one --keepbranches |
|
72 | 72 | rebasing 5:24b6387c8c8c "F" |
|
73 | 73 | rebasing 6:eea13746799a "G" |
|
74 | 74 | rebasing 7:02de42196ebe "H" |
|
75 | 75 | rebasing 9:cb039b7cae8e "dev-two named branch" (tip) |
|
76 | 76 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-24cb8001-rebase.hg (glob) |
|
77 | 77 | |
|
78 | 78 | $ hg tglog |
|
79 | @ 9: 'dev-two named branch' dev-two | |
|
79 | @ 9: 9e70cd31750f 'dev-two named branch' dev-two | |
|
80 | 80 | | |
|
81 | o 8: 'H' | |
|
81 | o 8: 31d0e4ba75e6 'H' | |
|
82 | 82 | | |
|
83 | | o 7: 'G' | |
|
83 | | o 7: 4b988a958030 'G' | |
|
84 | 84 | |/| |
|
85 | o | 6: 'F' | |
|
85 | o | 6: 24de4aff8e28 'F' | |
|
86 | 86 | | | |
|
87 | o | 5: 'dev-one named branch' dev-one | |
|
87 | o | 5: 643fc9128048 'dev-one named branch' dev-one | |
|
88 | 88 | | | |
|
89 | | o 4: 'E' | |
|
89 | | o 4: 9520eea781bc 'E' | |
|
90 | 90 | | | |
|
91 | o | 3: 'D' | |
|
91 | o | 3: 32af7686d403 'D' | |
|
92 | 92 | | | |
|
93 | o | 2: 'C' | |
|
93 | o | 2: 5fddd98957c8 'C' | |
|
94 | 94 | | | |
|
95 | o | 1: 'B' | |
|
95 | o | 1: 42ccdea3bb16 'B' | |
|
96 | 96 | |/ |
|
97 | o 0: 'A' | |
|
97 | o 0: cd010b8cd998 'A' | |
|
98 | 98 | |
|
99 | 99 | $ hg rebase -s dev-one -d 0 --keepbranches |
|
100 | 100 | rebasing 5:643fc9128048 "dev-one named branch" |
|
101 | 101 | rebasing 6:24de4aff8e28 "F" |
|
102 | 102 | rebasing 7:4b988a958030 "G" |
|
103 | 103 | rebasing 8:31d0e4ba75e6 "H" |
|
104 | 104 | rebasing 9:9e70cd31750f "dev-two named branch" (tip) |
|
105 | 105 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-c4ee9ef5-rebase.hg (glob) |
|
106 | 106 | |
|
107 | 107 | $ hg tglog |
|
108 | @ 9: 'dev-two named branch' dev-two | |
|
108 | @ 9: 59c2e59309fe 'dev-two named branch' dev-two | |
|
109 | 109 | | |
|
110 | o 8: 'H' | |
|
110 | o 8: 904590360559 'H' | |
|
111 | 111 | | |
|
112 | | o 7: 'G' | |
|
112 | | o 7: 1a1e6f72ec38 'G' | |
|
113 | 113 | |/| |
|
114 | o | 6: 'F' | |
|
114 | o | 6: 42aa3cf0fa7a 'F' | |
|
115 | 115 | | | |
|
116 | o | 5: 'dev-one named branch' dev-one | |
|
116 | o | 5: bc8139ee757c 'dev-one named branch' dev-one | |
|
117 | 117 | | | |
|
118 | | o 4: 'E' | |
|
118 | | o 4: 9520eea781bc 'E' | |
|
119 | 119 | |/ |
|
120 | | o 3: 'D' | |
|
120 | | o 3: 32af7686d403 'D' | |
|
121 | 121 | | | |
|
122 | | o 2: 'C' | |
|
122 | | o 2: 5fddd98957c8 'C' | |
|
123 | 123 | | | |
|
124 | | o 1: 'B' | |
|
124 | | o 1: 42ccdea3bb16 'B' | |
|
125 | 125 | |/ |
|
126 | o 0: 'A' | |
|
126 | o 0: cd010b8cd998 'A' | |
|
127 | 127 | |
|
128 | 128 | $ hg update 3 |
|
129 | 129 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
130 | 130 | $ hg branch -f dev-one |
|
131 | 131 | marked working directory as branch dev-one |
|
132 | 132 | $ hg ci -m 'dev-one named branch' |
|
133 | 133 | created new head |
|
134 | 134 | |
|
135 | 135 | $ hg tglog |
|
136 | @ 10: 'dev-one named branch' dev-one | |
|
136 | @ 10: 643fc9128048 'dev-one named branch' dev-one | |
|
137 | 137 | | |
|
138 | | o 9: 'dev-two named branch' dev-two | |
|
138 | | o 9: 59c2e59309fe 'dev-two named branch' dev-two | |
|
139 | 139 | | | |
|
140 | | o 8: 'H' | |
|
140 | | o 8: 904590360559 'H' | |
|
141 | 141 | | | |
|
142 | | | o 7: 'G' | |
|
142 | | | o 7: 1a1e6f72ec38 'G' | |
|
143 | 143 | | |/| |
|
144 | | o | 6: 'F' | |
|
144 | | o | 6: 42aa3cf0fa7a 'F' | |
|
145 | 145 | | | | |
|
146 | | o | 5: 'dev-one named branch' dev-one | |
|
146 | | o | 5: bc8139ee757c 'dev-one named branch' dev-one | |
|
147 | 147 | | | | |
|
148 | | | o 4: 'E' | |
|
148 | | | o 4: 9520eea781bc 'E' | |
|
149 | 149 | | |/ |
|
150 | o | 3: 'D' | |
|
150 | o | 3: 32af7686d403 'D' | |
|
151 | 151 | | | |
|
152 | o | 2: 'C' | |
|
152 | o | 2: 5fddd98957c8 'C' | |
|
153 | 153 | | | |
|
154 | o | 1: 'B' | |
|
154 | o | 1: 42ccdea3bb16 'B' | |
|
155 | 155 | |/ |
|
156 | o 0: 'A' | |
|
156 | o 0: cd010b8cd998 'A' | |
|
157 | 157 | |
|
158 | 158 | $ hg rebase -b 'max(branch("dev-two"))' -d dev-one --keepbranches |
|
159 | 159 | rebasing 5:bc8139ee757c "dev-one named branch" |
|
160 | 160 | note: rebase of 5:bc8139ee757c created no changes to commit |
|
161 | 161 | rebasing 6:42aa3cf0fa7a "F" |
|
162 | 162 | rebasing 7:1a1e6f72ec38 "G" |
|
163 | 163 | rebasing 8:904590360559 "H" |
|
164 | 164 | rebasing 9:59c2e59309fe "dev-two named branch" |
|
165 | 165 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/bc8139ee757c-f11c1080-rebase.hg (glob) |
|
166 | 166 | |
|
167 | 167 | $ hg tglog |
|
168 | o 9: 'dev-two named branch' dev-two | |
|
168 | o 9: 71325f8bc082 'dev-two named branch' dev-two | |
|
169 | 169 | | |
|
170 | o 8: 'H' | |
|
170 | o 8: 12b2bc666e20 'H' | |
|
171 | 171 | | |
|
172 | | o 7: 'G' | |
|
172 | | o 7: 549f007a9f5f 'G' | |
|
173 | 173 | |/| |
|
174 | o | 6: 'F' | |
|
174 | o | 6: 679f28760620 'F' | |
|
175 | 175 | | | |
|
176 | @ | 5: 'dev-one named branch' dev-one | |
|
176 | @ | 5: 643fc9128048 'dev-one named branch' dev-one | |
|
177 | 177 | | | |
|
178 | | o 4: 'E' | |
|
178 | | o 4: 9520eea781bc 'E' | |
|
179 | 179 | | | |
|
180 | o | 3: 'D' | |
|
180 | o | 3: 32af7686d403 'D' | |
|
181 | 181 | | | |
|
182 | o | 2: 'C' | |
|
182 | o | 2: 5fddd98957c8 'C' | |
|
183 | 183 | | | |
|
184 | o | 1: 'B' | |
|
184 | o | 1: 42ccdea3bb16 'B' | |
|
185 | 185 | |/ |
|
186 | o 0: 'A' | |
|
186 | o 0: cd010b8cd998 'A' | |
|
187 | 187 | |
|
188 | 188 | $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches |
|
189 | 189 | rebasing 5:643fc9128048 "dev-one named branch" |
|
190 | 190 | rebasing 6:679f28760620 "F" |
|
191 | 191 | rebasing 7:549f007a9f5f "G" |
|
192 | 192 | rebasing 8:12b2bc666e20 "H" |
|
193 | 193 | rebasing 9:71325f8bc082 "dev-two named branch" (tip) |
|
194 | 194 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-6cdd1a52-rebase.hg (glob) |
|
195 | 195 | |
|
196 | 196 | $ hg tglog |
|
197 | o 9: 'dev-two named branch' dev-two | |
|
197 | o 9: 3944801ae4ea 'dev-two named branch' dev-two | |
|
198 | 198 | | |
|
199 | o 8: 'H' | |
|
199 | o 8: 8e279d293175 'H' | |
|
200 | 200 | | |
|
201 | | o 7: 'G' | |
|
201 | | o 7: aeefee77ab01 'G' | |
|
202 | 202 | |/| |
|
203 | o | 6: 'F' | |
|
203 | o | 6: e908b85f3729 'F' | |
|
204 | 204 | | | |
|
205 | @ | 5: 'dev-one named branch' dev-one | |
|
205 | @ | 5: bc8139ee757c 'dev-one named branch' dev-one | |
|
206 | 206 | | | |
|
207 | | o 4: 'E' | |
|
207 | | o 4: 9520eea781bc 'E' | |
|
208 | 208 | |/ |
|
209 | | o 3: 'D' | |
|
209 | | o 3: 32af7686d403 'D' | |
|
210 | 210 | | | |
|
211 | | o 2: 'C' | |
|
211 | | o 2: 5fddd98957c8 'C' | |
|
212 | 212 | | | |
|
213 | | o 1: 'B' | |
|
213 | | o 1: 42ccdea3bb16 'B' | |
|
214 | 214 | |/ |
|
215 | o 0: 'A' | |
|
215 | o 0: cd010b8cd998 'A' | |
|
216 | 216 | |
|
217 | 217 | $ hg up -r 0 > /dev/null |
|
218 | 218 | |
|
219 | 219 | Rebasing descendant onto ancestor across different named branches |
|
220 | 220 | |
|
221 | 221 | $ hg rebase -s 1 -d 9 --keepbranches |
|
222 | 222 | rebasing 1:42ccdea3bb16 "B" |
|
223 | 223 | rebasing 2:5fddd98957c8 "C" |
|
224 | 224 | rebasing 3:32af7686d403 "D" |
|
225 | 225 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
226 | 226 | |
|
227 | 227 | $ hg tglog |
|
228 | o 9: 'D' | |
|
228 | o 9: e9f862ce8bad 'D' | |
|
229 | 229 | | |
|
230 | o 8: 'C' | |
|
230 | o 8: a0d543090fa4 'C' | |
|
231 | 231 | | |
|
232 | o 7: 'B' | |
|
232 | o 7: 3bdb949809d9 'B' | |
|
233 | 233 | | |
|
234 | o 6: 'dev-two named branch' dev-two | |
|
234 | o 6: 3944801ae4ea 'dev-two named branch' dev-two | |
|
235 | 235 | | |
|
236 | o 5: 'H' | |
|
236 | o 5: 8e279d293175 'H' | |
|
237 | 237 | | |
|
238 | | o 4: 'G' | |
|
238 | | o 4: aeefee77ab01 'G' | |
|
239 | 239 | |/| |
|
240 | o | 3: 'F' | |
|
240 | o | 3: e908b85f3729 'F' | |
|
241 | 241 | | | |
|
242 | o | 2: 'dev-one named branch' dev-one | |
|
242 | o | 2: bc8139ee757c 'dev-one named branch' dev-one | |
|
243 | 243 | | | |
|
244 | | o 1: 'E' | |
|
244 | | o 1: 9520eea781bc 'E' | |
|
245 | 245 | |/ |
|
246 | @ 0: 'A' | |
|
246 | @ 0: cd010b8cd998 'A' | |
|
247 | 247 | |
|
248 | 248 | $ hg rebase -s 5 -d 6 |
|
249 | 249 | abort: source and destination form a cycle |
|
250 | 250 | [255] |
|
251 | 251 | |
|
252 | 252 | $ hg rebase -s 6 -d 5 |
|
253 | 253 | rebasing 6:3944801ae4ea "dev-two named branch" |
|
254 | 254 | rebasing 7:3bdb949809d9 "B" |
|
255 | 255 | rebasing 8:a0d543090fa4 "C" |
|
256 | 256 | rebasing 9:e9f862ce8bad "D" (tip) |
|
257 | 257 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/3944801ae4ea-fb46ed74-rebase.hg (glob) |
|
258 | 258 | |
|
259 | 259 | $ hg tglog |
|
260 | o 9: 'D' | |
|
260 | o 9: e522577ccdbd 'D' | |
|
261 | 261 | | |
|
262 | o 8: 'C' | |
|
262 | o 8: 810110211f50 'C' | |
|
263 | 263 | | |
|
264 | o 7: 'B' | |
|
264 | o 7: 160b0930ccc6 'B' | |
|
265 | 265 | | |
|
266 | o 6: 'dev-two named branch' | |
|
266 | o 6: c57724c84928 'dev-two named branch' | |
|
267 | 267 | | |
|
268 | o 5: 'H' | |
|
268 | o 5: 8e279d293175 'H' | |
|
269 | 269 | | |
|
270 | | o 4: 'G' | |
|
270 | | o 4: aeefee77ab01 'G' | |
|
271 | 271 | |/| |
|
272 | o | 3: 'F' | |
|
272 | o | 3: e908b85f3729 'F' | |
|
273 | 273 | | | |
|
274 | o | 2: 'dev-one named branch' dev-one | |
|
274 | o | 2: bc8139ee757c 'dev-one named branch' dev-one | |
|
275 | 275 | | | |
|
276 | | o 1: 'E' | |
|
276 | | o 1: 9520eea781bc 'E' | |
|
277 | 277 | |/ |
|
278 | @ 0: 'A' | |
|
278 | @ 0: cd010b8cd998 'A' | |
|
279 | 279 | |
|
280 | 280 | |
|
281 | 281 | Reopen branch by rebase |
|
282 | 282 | |
|
283 | 283 | $ hg up -qr3 |
|
284 | 284 | $ hg branch -q b |
|
285 | 285 | $ hg ci -m 'create b' |
|
286 | 286 | $ hg ci -m 'close b' --close |
|
287 | 287 | $ hg rebase -b 8 -d b |
|
288 | 288 | reopening closed branch head 2b586e70108d |
|
289 | 289 | rebasing 5:8e279d293175 "H" |
|
290 | 290 | rebasing 6:c57724c84928 "dev-two named branch" |
|
291 | 291 | rebasing 7:160b0930ccc6 "B" |
|
292 | 292 | rebasing 8:810110211f50 "C" |
|
293 | 293 | rebasing 9:e522577ccdbd "D" |
|
294 | 294 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg (glob) |
|
295 | 295 | |
|
296 | 296 | $ cd .. |
|
297 | 297 | |
|
298 | 298 | Rebase to other head on branch |
|
299 | 299 | |
|
300 | 300 | Set up a case: |
|
301 | 301 | |
|
302 | 302 | $ hg init case1 |
|
303 | 303 | $ cd case1 |
|
304 | 304 | $ touch f |
|
305 | 305 | $ hg ci -qAm0 |
|
306 | 306 | $ hg branch -q b |
|
307 | 307 | $ echo >> f |
|
308 | 308 | $ hg ci -qAm 'b1' |
|
309 | 309 | $ hg up -qr -2 |
|
310 | 310 | $ hg branch -qf b |
|
311 | 311 | $ hg ci -qm 'b2' |
|
312 | 312 | $ hg up -qr -3 |
|
313 | 313 | $ hg branch -q c |
|
314 | 314 | $ hg ci -m 'c1' |
|
315 | 315 | |
|
316 | 316 | $ hg tglog |
|
317 | @ 3: 'c1' c | |
|
317 | @ 3: c062e3ecd6c6 'c1' c | |
|
318 | 318 | | |
|
319 | | o 2: 'b2' b | |
|
319 | | o 2: 792845bb77ee 'b2' b | |
|
320 | 320 | |/ |
|
321 | | o 1: 'b1' b | |
|
321 | | o 1: 40039acb7ca5 'b1' b | |
|
322 | 322 | |/ |
|
323 | o 0: '0' | |
|
323 | o 0: d681519c3ea7 '0' | |
|
324 | 324 | |
|
325 | 325 | $ hg clone -q . ../case2 |
|
326 | 326 | |
|
327 | 327 | rebase 'b2' to another lower branch head |
|
328 | 328 | |
|
329 | 329 | $ hg up -qr 2 |
|
330 | 330 | $ hg rebase |
|
331 | 331 | rebasing 2:792845bb77ee "b2" |
|
332 | 332 | note: rebase of 2:792845bb77ee created no changes to commit |
|
333 | 333 | saved backup bundle to $TESTTMP/case1/.hg/strip-backup/792845bb77ee-627120ee-rebase.hg (glob) |
|
334 | 334 | $ hg tglog |
|
335 | o 2: 'c1' c | |
|
335 | o 2: c062e3ecd6c6 'c1' c | |
|
336 | 336 | | |
|
337 | | @ 1: 'b1' b | |
|
337 | | @ 1: 40039acb7ca5 'b1' b | |
|
338 | 338 | |/ |
|
339 | o 0: '0' | |
|
339 | o 0: d681519c3ea7 '0' | |
|
340 | 340 | |
|
341 | 341 | |
|
342 | 342 | rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1') |
|
343 | 343 | |
|
344 | 344 | $ cd ../case2 |
|
345 | 345 | $ hg up -qr 1 |
|
346 | 346 | $ hg rebase |
|
347 | 347 | rebasing 1:40039acb7ca5 "b1" |
|
348 | 348 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-342b72d1-rebase.hg (glob) |
|
349 | 349 | $ hg tglog |
|
350 | @ 3: 'b1' b | |
|
350 | @ 3: 76abc1c6f8c7 'b1' b | |
|
351 | 351 | | |
|
352 | | o 2: 'c1' c | |
|
352 | | o 2: c062e3ecd6c6 'c1' c | |
|
353 | 353 | | | |
|
354 | o | 1: 'b2' b | |
|
354 | o | 1: 792845bb77ee 'b2' b | |
|
355 | 355 | |/ |
|
356 | o 0: '0' | |
|
356 | o 0: d681519c3ea7 '0' | |
|
357 | 357 | |
|
358 | 358 | |
|
359 | 359 | rebase 'c1' to the branch head 'c2' that is closed |
|
360 | 360 | |
|
361 | 361 | $ hg branch -qf c |
|
362 | 362 | $ hg ci -qm 'c2 closed' --close |
|
363 | 363 | $ hg up -qr 2 |
|
364 | 364 | $ hg tglog |
|
365 | _ 4: 'c2 closed' c | |
|
365 | _ 4: 8427af5d86f2 'c2 closed' c | |
|
366 | 366 | | |
|
367 | o 3: 'b1' b | |
|
367 | o 3: 76abc1c6f8c7 'b1' b | |
|
368 | 368 | | |
|
369 | | @ 2: 'c1' c | |
|
369 | | @ 2: c062e3ecd6c6 'c1' c | |
|
370 | 370 | | | |
|
371 | o | 1: 'b2' b | |
|
371 | o | 1: 792845bb77ee 'b2' b | |
|
372 | 372 | |/ |
|
373 | o 0: '0' | |
|
373 | o 0: d681519c3ea7 '0' | |
|
374 | 374 | |
|
375 | 375 | $ hg rebase |
|
376 | 376 | abort: branch 'c' has one head - please rebase to an explicit rev |
|
377 | 377 | (run 'hg heads' to see all heads) |
|
378 | 378 | [255] |
|
379 | 379 | $ hg tglog |
|
380 | _ 4: 'c2 closed' c | |
|
380 | _ 4: 8427af5d86f2 'c2 closed' c | |
|
381 | 381 | | |
|
382 | o 3: 'b1' b | |
|
382 | o 3: 76abc1c6f8c7 'b1' b | |
|
383 | 383 | | |
|
384 | | @ 2: 'c1' c | |
|
384 | | @ 2: c062e3ecd6c6 'c1' c | |
|
385 | 385 | | | |
|
386 | o | 1: 'b2' b | |
|
386 | o | 1: 792845bb77ee 'b2' b | |
|
387 | 387 | |/ |
|
388 | o 0: '0' | |
|
388 | o 0: d681519c3ea7 '0' | |
|
389 | 389 | |
|
390 | 390 | |
|
391 | 391 | $ hg up -cr 1 |
|
392 | 392 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
393 | 393 | $ hg branch x |
|
394 | 394 | marked working directory as branch x |
|
395 | 395 | $ hg rebase -r 3:: -d . |
|
396 | 396 | rebasing 3:76abc1c6f8c7 "b1" |
|
397 | 397 | rebasing 4:8427af5d86f2 "c2 closed" (tip) |
|
398 | 398 | note: rebase of 4:8427af5d86f2 created no changes to commit |
|
399 | 399 | saved backup bundle to $TESTTMP/case2/.hg/strip-backup/76abc1c6f8c7-cd698d13-rebase.hg (glob) |
|
400 | 400 | $ hg tglog |
|
401 | o 3: 'b1' x | |
|
401 | o 3: 117b0ed08075 'b1' x | |
|
402 | 402 | | |
|
403 | | o 2: 'c1' c | |
|
403 | | o 2: c062e3ecd6c6 'c1' c | |
|
404 | 404 | | | |
|
405 | @ | 1: 'b2' b | |
|
405 | @ | 1: 792845bb77ee 'b2' b | |
|
406 | 406 | |/ |
|
407 | o 0: '0' | |
|
407 | o 0: d681519c3ea7 '0' | |
|
408 | 408 | |
|
409 | 409 | |
|
410 | 410 | $ cd .. |
@@ -1,426 +1,426 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [format] |
|
3 | 3 | > usegeneraldelta=yes |
|
4 | 4 | > [extensions] |
|
5 | 5 | > rebase= |
|
6 | 6 | > drawdag=$TESTDIR/drawdag.py |
|
7 | 7 | > [alias] |
|
8 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
8 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | $ hg init repo |
|
12 | 12 | $ cd repo |
|
13 | 13 | |
|
14 | 14 | $ echo A > a |
|
15 | 15 | $ echo >> a |
|
16 | 16 | $ hg ci -Am A |
|
17 | 17 | adding a |
|
18 | 18 | |
|
19 | 19 | $ echo B > a |
|
20 | 20 | $ echo >> a |
|
21 | 21 | $ hg ci -m B |
|
22 | 22 | |
|
23 | 23 | $ echo C > a |
|
24 | 24 | $ echo >> a |
|
25 | 25 | $ hg ci -m C |
|
26 | 26 | |
|
27 | 27 | $ hg up -q -C 0 |
|
28 | 28 | |
|
29 | 29 | $ echo D >> a |
|
30 | 30 | $ hg ci -Am AD |
|
31 | 31 | created new head |
|
32 | 32 | |
|
33 | 33 | $ hg tglog |
|
34 | @ 3: 'AD' | |
|
34 | @ 3: 3878212183bd 'AD' | |
|
35 | 35 | | |
|
36 | | o 2: 'C' | |
|
36 | | o 2: 30ae917c0e4f 'C' | |
|
37 | 37 | | | |
|
38 | | o 1: 'B' | |
|
38 | | o 1: 0f4f7cb4f549 'B' | |
|
39 | 39 | |/ |
|
40 | o 0: 'A' | |
|
40 | o 0: 1e635d440a73 'A' | |
|
41 | 41 | |
|
42 | 42 | $ hg rebase -s 1 -d 3 |
|
43 | 43 | rebasing 1:0f4f7cb4f549 "B" |
|
44 | 44 | merging a |
|
45 | 45 | rebasing 2:30ae917c0e4f "C" |
|
46 | 46 | merging a |
|
47 | 47 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/0f4f7cb4f549-82b3b163-rebase.hg (glob) |
|
48 | 48 | |
|
49 | 49 | $ hg tglog |
|
50 | o 3: 'C' | |
|
50 | o 3: 25773bc4b4b0 'C' | |
|
51 | 51 | | |
|
52 | o 2: 'B' | |
|
52 | o 2: c09015405f75 'B' | |
|
53 | 53 | | |
|
54 | @ 1: 'AD' | |
|
54 | @ 1: 3878212183bd 'AD' | |
|
55 | 55 | | |
|
56 | o 0: 'A' | |
|
56 | o 0: 1e635d440a73 'A' | |
|
57 | 57 | |
|
58 | 58 | |
|
59 | 59 | $ cd .. |
|
60 | 60 | |
|
61 | 61 | |
|
62 | 62 | Test rebasing of merges with ancestors of the rebase destination - a situation |
|
63 | 63 | that often happens when trying to recover from repeated merging with a mainline |
|
64 | 64 | branch. |
|
65 | 65 | |
|
66 | 66 | The test case creates a dev branch that contains a couple of merges from the |
|
67 | 67 | default branch. When rebasing to the default branch, these merges would be |
|
68 | 68 | merges with ancestors on the same branch. The merges _could_ contain some |
|
69 | 69 | interesting conflict resolutions or additional changes in the merge commit, but |
|
70 | 70 | that is mixed up with the actual merge stuff and there is in general no way to |
|
71 | 71 | separate them. |
|
72 | 72 | |
|
73 | 73 | Note: The dev branch contains _no_ changes to f-default. It might be unclear |
|
74 | 74 | how rebasing of ancestor merges should be handled, but the current behavior |
|
75 | 75 | with spurious prompts for conflicts in files that didn't change seems very |
|
76 | 76 | wrong. |
|
77 | 77 | |
|
78 | 78 | $ hg init ancestor-merge |
|
79 | 79 | $ cd ancestor-merge |
|
80 | 80 | |
|
81 | 81 | $ touch f-default |
|
82 | 82 | $ hg ci -Aqm 'default: create f-default' |
|
83 | 83 | |
|
84 | 84 | $ hg branch -q dev |
|
85 | 85 | $ hg ci -qm 'dev: create branch' |
|
86 | 86 | |
|
87 | 87 | $ echo stuff > f-dev |
|
88 | 88 | $ hg ci -Aqm 'dev: f-dev stuff' |
|
89 | 89 | |
|
90 | 90 | $ hg up -q default |
|
91 | 91 | $ echo stuff > f-default |
|
92 | 92 | $ hg ci -m 'default: f-default stuff' |
|
93 | 93 | |
|
94 | 94 | $ hg up -q dev |
|
95 | 95 | $ hg merge -q default |
|
96 | 96 | $ hg ci -m 'dev: merge default' |
|
97 | 97 | |
|
98 | 98 | $ hg up -q default |
|
99 | 99 | $ hg rm f-default |
|
100 | 100 | $ hg ci -m 'default: remove f-default' |
|
101 | 101 | |
|
102 | 102 | $ hg up -q dev |
|
103 | 103 | $ hg merge -q default |
|
104 | 104 | $ hg ci -m 'dev: merge default' |
|
105 | 105 | |
|
106 | 106 | $ hg up -q default |
|
107 | 107 | $ echo stuff > f-other |
|
108 | 108 | $ hg ci -Aqm 'default: f-other stuff' |
|
109 | 109 | |
|
110 | 110 | $ hg tglog |
|
111 | @ 7: 'default: f-other stuff' | |
|
111 | @ 7: e08089805d82 'default: f-other stuff' | |
|
112 | 112 | | |
|
113 | | o 6: 'dev: merge default' dev | |
|
113 | | o 6: 9455ee510502 'dev: merge default' dev | |
|
114 | 114 | |/| |
|
115 | o | 5: 'default: remove f-default' | |
|
115 | o | 5: 462860db70a1 'default: remove f-default' | |
|
116 | 116 | | | |
|
117 | | o 4: 'dev: merge default' dev | |
|
117 | | o 4: 4b019212aaf6 'dev: merge default' dev | |
|
118 | 118 | |/| |
|
119 | o | 3: 'default: f-default stuff' | |
|
119 | o | 3: f157ecfd2b6b 'default: f-default stuff' | |
|
120 | 120 | | | |
|
121 | | o 2: 'dev: f-dev stuff' dev | |
|
121 | | o 2: ec2c14fb2984 'dev: f-dev stuff' dev | |
|
122 | 122 | | | |
|
123 | | o 1: 'dev: create branch' dev | |
|
123 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
|
124 | 124 | |/ |
|
125 | o 0: 'default: create f-default' | |
|
125 | o 0: e90e8eb90b6f 'default: create f-default' | |
|
126 | 126 | |
|
127 | 127 | $ hg clone -qU . ../ancestor-merge-2 |
|
128 | 128 | |
|
129 | 129 | Full rebase all the way back from branching point: |
|
130 | 130 | |
|
131 | 131 | $ hg rebase -r 'only(dev,default)' -d default --config ui.interactive=True << EOF |
|
132 | 132 | > c |
|
133 | 133 | > EOF |
|
134 | 134 | rebasing 1:1d1a643d390e "dev: create branch" |
|
135 | 135 | note: rebase of 1:1d1a643d390e created no changes to commit |
|
136 | 136 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
137 | 137 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
138 | 138 | other [source] changed f-default which local [dest] deleted |
|
139 | 139 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c |
|
140 | 140 | rebasing 6:9455ee510502 "dev: merge default" |
|
141 | 141 | saved backup bundle to $TESTTMP/ancestor-merge/.hg/strip-backup/1d1a643d390e-43e9e04b-rebase.hg (glob) |
|
142 | 142 | $ hg tglog |
|
143 | o 6: 'dev: merge default' | |
|
143 | o 6: fbc098e72227 'dev: merge default' | |
|
144 | 144 | | |
|
145 | o 5: 'dev: merge default' | |
|
145 | o 5: eda7b7f46f5d 'dev: merge default' | |
|
146 | 146 | | |
|
147 | o 4: 'dev: f-dev stuff' | |
|
147 | o 4: 3e075b1c0a40 'dev: f-dev stuff' | |
|
148 | 148 | | |
|
149 | @ 3: 'default: f-other stuff' | |
|
149 | @ 3: e08089805d82 'default: f-other stuff' | |
|
150 | 150 | | |
|
151 | o 2: 'default: remove f-default' | |
|
151 | o 2: 462860db70a1 'default: remove f-default' | |
|
152 | 152 | | |
|
153 | o 1: 'default: f-default stuff' | |
|
153 | o 1: f157ecfd2b6b 'default: f-default stuff' | |
|
154 | 154 | | |
|
155 | o 0: 'default: create f-default' | |
|
155 | o 0: e90e8eb90b6f 'default: create f-default' | |
|
156 | 156 | |
|
157 | 157 | Grafty cherry picking rebasing: |
|
158 | 158 | |
|
159 | 159 | $ cd ../ancestor-merge-2 |
|
160 | 160 | |
|
161 | 161 | $ hg phase -fdr0: |
|
162 | 162 | $ hg rebase -r 'children(only(dev,default))' -d default --config ui.interactive=True << EOF |
|
163 | 163 | > c |
|
164 | 164 | > EOF |
|
165 | 165 | rebasing 2:ec2c14fb2984 "dev: f-dev stuff" |
|
166 | 166 | rebasing 4:4b019212aaf6 "dev: merge default" |
|
167 | 167 | other [source] changed f-default which local [dest] deleted |
|
168 | 168 | use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c |
|
169 | 169 | rebasing 6:9455ee510502 "dev: merge default" |
|
170 | 170 | saved backup bundle to $TESTTMP/ancestor-merge-2/.hg/strip-backup/ec2c14fb2984-62d0b222-rebase.hg (glob) |
|
171 | 171 | $ hg tglog |
|
172 | o 7: 'dev: merge default' | |
|
172 | o 7: fbc098e72227 'dev: merge default' | |
|
173 | 173 | | |
|
174 | o 6: 'dev: merge default' | |
|
174 | o 6: eda7b7f46f5d 'dev: merge default' | |
|
175 | 175 | | |
|
176 | o 5: 'dev: f-dev stuff' | |
|
176 | o 5: 3e075b1c0a40 'dev: f-dev stuff' | |
|
177 | 177 | | |
|
178 | o 4: 'default: f-other stuff' | |
|
178 | o 4: e08089805d82 'default: f-other stuff' | |
|
179 | 179 | | |
|
180 | o 3: 'default: remove f-default' | |
|
180 | o 3: 462860db70a1 'default: remove f-default' | |
|
181 | 181 | | |
|
182 | o 2: 'default: f-default stuff' | |
|
182 | o 2: f157ecfd2b6b 'default: f-default stuff' | |
|
183 | 183 | | |
|
184 | | o 1: 'dev: create branch' dev | |
|
184 | | o 1: 1d1a643d390e 'dev: create branch' dev | |
|
185 | 185 | |/ |
|
186 | o 0: 'default: create f-default' | |
|
186 | o 0: e90e8eb90b6f 'default: create f-default' | |
|
187 | 187 | |
|
188 | 188 | $ cd .. |
|
189 | 189 | |
|
190 | 190 | |
|
191 | 191 | Test order of parents of rebased merged with un-rebased changes as p1. |
|
192 | 192 | |
|
193 | 193 | $ hg init parentorder |
|
194 | 194 | $ cd parentorder |
|
195 | 195 | $ touch f |
|
196 | 196 | $ hg ci -Aqm common |
|
197 | 197 | $ touch change |
|
198 | 198 | $ hg ci -Aqm change |
|
199 | 199 | $ touch target |
|
200 | 200 | $ hg ci -Aqm target |
|
201 | 201 | $ hg up -qr 0 |
|
202 | 202 | $ touch outside |
|
203 | 203 | $ hg ci -Aqm outside |
|
204 | 204 | $ hg merge -qr 1 |
|
205 | 205 | $ hg ci -m 'merge p1 3=outside p2 1=ancestor' |
|
206 | 206 | $ hg par |
|
207 | 207 | changeset: 4:6990226659be |
|
208 | 208 | tag: tip |
|
209 | 209 | parent: 3:f59da8fc0fcf |
|
210 | 210 | parent: 1:dd40c13f7a6f |
|
211 | 211 | user: test |
|
212 | 212 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
213 | 213 | summary: merge p1 3=outside p2 1=ancestor |
|
214 | 214 | |
|
215 | 215 | $ hg up -qr 1 |
|
216 | 216 | $ hg merge -qr 3 |
|
217 | 217 | $ hg ci -qm 'merge p1 1=ancestor p2 3=outside' |
|
218 | 218 | $ hg par |
|
219 | 219 | changeset: 5:a57575f79074 |
|
220 | 220 | tag: tip |
|
221 | 221 | parent: 1:dd40c13f7a6f |
|
222 | 222 | parent: 3:f59da8fc0fcf |
|
223 | 223 | user: test |
|
224 | 224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
225 | 225 | summary: merge p1 1=ancestor p2 3=outside |
|
226 | 226 | |
|
227 | 227 | $ hg tglog |
|
228 | @ 5: 'merge p1 1=ancestor p2 3=outside' | |
|
228 | @ 5: a57575f79074 'merge p1 1=ancestor p2 3=outside' | |
|
229 | 229 | |\ |
|
230 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
|
230 | +---o 4: 6990226659be 'merge p1 3=outside p2 1=ancestor' | |
|
231 | 231 | | |/ |
|
232 | | o 3: 'outside' | |
|
232 | | o 3: f59da8fc0fcf 'outside' | |
|
233 | 233 | | | |
|
234 | +---o 2: 'target' | |
|
234 | +---o 2: a60552eb93fb 'target' | |
|
235 | 235 | | | |
|
236 | o | 1: 'change' | |
|
236 | o | 1: dd40c13f7a6f 'change' | |
|
237 | 237 | |/ |
|
238 | o 0: 'common' | |
|
238 | o 0: 02f0f58d5300 'common' | |
|
239 | 239 | |
|
240 | 240 | $ hg rebase -r 4 -d 2 |
|
241 | 241 | rebasing 4:6990226659be "merge p1 3=outside p2 1=ancestor" |
|
242 | 242 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/6990226659be-4d67a0d3-rebase.hg (glob) |
|
243 | 243 | $ hg tip |
|
244 | 244 | changeset: 5:cca50676b1c5 |
|
245 | 245 | tag: tip |
|
246 | 246 | parent: 2:a60552eb93fb |
|
247 | 247 | parent: 3:f59da8fc0fcf |
|
248 | 248 | user: test |
|
249 | 249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
250 | 250 | summary: merge p1 3=outside p2 1=ancestor |
|
251 | 251 | |
|
252 | 252 | $ hg rebase -r 4 -d 2 |
|
253 | 253 | rebasing 4:a57575f79074 "merge p1 1=ancestor p2 3=outside" |
|
254 | 254 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/a57575f79074-385426e5-rebase.hg (glob) |
|
255 | 255 | $ hg tip |
|
256 | 256 | changeset: 5:f9daf77ffe76 |
|
257 | 257 | tag: tip |
|
258 | 258 | parent: 2:a60552eb93fb |
|
259 | 259 | parent: 3:f59da8fc0fcf |
|
260 | 260 | user: test |
|
261 | 261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
262 | 262 | summary: merge p1 1=ancestor p2 3=outside |
|
263 | 263 | |
|
264 | 264 | $ hg tglog |
|
265 | @ 5: 'merge p1 1=ancestor p2 3=outside' | |
|
265 | @ 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
|
266 | 266 | |\ |
|
267 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
|
267 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
|
268 | 268 | | |/ |
|
269 | | o 3: 'outside' | |
|
269 | | o 3: f59da8fc0fcf 'outside' | |
|
270 | 270 | | | |
|
271 | o | 2: 'target' | |
|
271 | o | 2: a60552eb93fb 'target' | |
|
272 | 272 | | | |
|
273 | o | 1: 'change' | |
|
273 | o | 1: dd40c13f7a6f 'change' | |
|
274 | 274 | |/ |
|
275 | o 0: 'common' | |
|
275 | o 0: 02f0f58d5300 'common' | |
|
276 | 276 | |
|
277 | 277 | rebase of merge of ancestors |
|
278 | 278 | |
|
279 | 279 | $ hg up -qr 2 |
|
280 | 280 | $ hg merge -qr 3 |
|
281 | 281 | $ echo 'other change while merging future "rebase ancestors"' > other |
|
282 | 282 | $ hg ci -Aqm 'merge rebase ancestors' |
|
283 | 283 | $ hg rebase -d 5 -v |
|
284 | 284 | rebasing 6:4c5f12f25ebe "merge rebase ancestors" (tip) |
|
285 | 285 | resolving manifests |
|
286 | 286 | removing other |
|
287 | 287 | note: merging f9daf77ffe76+ and 4c5f12f25ebe using bids from ancestors a60552eb93fb and f59da8fc0fcf |
|
288 | 288 | |
|
289 | 289 | calculating bids for ancestor a60552eb93fb |
|
290 | 290 | resolving manifests |
|
291 | 291 | |
|
292 | 292 | calculating bids for ancestor f59da8fc0fcf |
|
293 | 293 | resolving manifests |
|
294 | 294 | |
|
295 | 295 | auction for merging merge bids |
|
296 | 296 | other: consensus for g |
|
297 | 297 | end of auction |
|
298 | 298 | |
|
299 | 299 | getting other |
|
300 | 300 | committing files: |
|
301 | 301 | other |
|
302 | 302 | committing manifest |
|
303 | 303 | committing changelog |
|
304 | 304 | rebase merging completed |
|
305 | 305 | 1 changesets found |
|
306 | 306 | uncompressed size of bundle content: |
|
307 | 307 | 199 (changelog) |
|
308 | 308 | 216 (manifests) |
|
309 | 309 | 182 other |
|
310 | 310 | saved backup bundle to $TESTTMP/parentorder/.hg/strip-backup/4c5f12f25ebe-f46990e5-rebase.hg (glob) |
|
311 | 311 | 1 changesets found |
|
312 | 312 | uncompressed size of bundle content: |
|
313 | 313 | 254 (changelog) |
|
314 | 314 | 167 (manifests) |
|
315 | 315 | 182 other |
|
316 | 316 | adding branch |
|
317 | 317 | adding changesets |
|
318 | 318 | adding manifests |
|
319 | 319 | adding file changes |
|
320 | 320 | added 1 changesets with 1 changes to 1 files |
|
321 | 321 | rebase completed |
|
322 | 322 | $ hg tglog |
|
323 | @ 6: 'merge rebase ancestors' | |
|
323 | @ 6: 113755df812b 'merge rebase ancestors' | |
|
324 | 324 | | |
|
325 | o 5: 'merge p1 1=ancestor p2 3=outside' | |
|
325 | o 5: f9daf77ffe76 'merge p1 1=ancestor p2 3=outside' | |
|
326 | 326 | |\ |
|
327 | +---o 4: 'merge p1 3=outside p2 1=ancestor' | |
|
327 | +---o 4: cca50676b1c5 'merge p1 3=outside p2 1=ancestor' | |
|
328 | 328 | | |/ |
|
329 | | o 3: 'outside' | |
|
329 | | o 3: f59da8fc0fcf 'outside' | |
|
330 | 330 | | | |
|
331 | o | 2: 'target' | |
|
331 | o | 2: a60552eb93fb 'target' | |
|
332 | 332 | | | |
|
333 | o | 1: 'change' | |
|
333 | o | 1: dd40c13f7a6f 'change' | |
|
334 | 334 | |/ |
|
335 | o 0: 'common' | |
|
335 | o 0: 02f0f58d5300 'common' | |
|
336 | 336 | |
|
337 | 337 | Due to the limitation of 3-way merge algorithm (1 merge base), rebasing a merge |
|
338 | 338 | may include unwanted content: |
|
339 | 339 | |
|
340 | 340 | $ hg init $TESTTMP/dual-merge-base1 |
|
341 | 341 | $ cd $TESTTMP/dual-merge-base1 |
|
342 | 342 | $ hg debugdrawdag <<'EOS' |
|
343 | 343 | > F |
|
344 | 344 | > /| |
|
345 | 345 | > D E |
|
346 | 346 | > | | |
|
347 | 347 | > B C |
|
348 | 348 | > |/ |
|
349 | 349 | > A Z |
|
350 | 350 | > |/ |
|
351 | 351 | > R |
|
352 | 352 | > EOS |
|
353 | 353 | $ hg rebase -r D+E+F -d Z |
|
354 | 354 | rebasing 5:5f2c926dfecf "D" (D) |
|
355 | 355 | rebasing 6:b296604d9846 "E" (E) |
|
356 | 356 | rebasing 7:caa9781e507d "F" (F tip) |
|
357 | 357 | abort: rebasing 7:caa9781e507d will include unwanted changes from 4:d6003a550c2c or 3:c1e6b162678d |
|
358 | 358 | [255] |
|
359 | 359 | |
|
360 | 360 | The warning does not get printed if there is no unwanted change detected: |
|
361 | 361 | |
|
362 | 362 | $ hg init $TESTTMP/dual-merge-base2 |
|
363 | 363 | $ cd $TESTTMP/dual-merge-base2 |
|
364 | 364 | $ hg debugdrawdag <<'EOS' |
|
365 | 365 | > D |
|
366 | 366 | > /| |
|
367 | 367 | > B C |
|
368 | 368 | > |/ |
|
369 | 369 | > A Z |
|
370 | 370 | > |/ |
|
371 | 371 | > R |
|
372 | 372 | > EOS |
|
373 | 373 | $ hg rebase -r B+C+D -d Z |
|
374 | 374 | rebasing 3:c1e6b162678d "B" (B) |
|
375 | 375 | rebasing 4:d6003a550c2c "C" (C) |
|
376 | 376 | rebasing 5:c8f78076273e "D" (D tip) |
|
377 | 377 | saved backup bundle to $TESTTMP/dual-merge-base2/.hg/strip-backup/d6003a550c2c-6f1424b6-rebase.hg (glob) |
|
378 | 378 | $ hg manifest -r 'desc(D)' |
|
379 | 379 | B |
|
380 | 380 | C |
|
381 | 381 | R |
|
382 | 382 | Z |
|
383 | 383 | |
|
384 | 384 | The merge base could be different from old p1 (changed parent becomes new p1): |
|
385 | 385 | |
|
386 | 386 | $ hg init $TESTTMP/chosen-merge-base1 |
|
387 | 387 | $ cd $TESTTMP/chosen-merge-base1 |
|
388 | 388 | $ hg debugdrawdag <<'EOS' |
|
389 | 389 | > F |
|
390 | 390 | > /| |
|
391 | 391 | > D E |
|
392 | 392 | > | | |
|
393 | 393 | > B C Z |
|
394 | 394 | > EOS |
|
395 | 395 | $ hg rebase -r D+F -d Z |
|
396 | 396 | rebasing 3:004dc1679908 "D" (D) |
|
397 | 397 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
398 | 398 | saved backup bundle to $TESTTMP/chosen-merge-base1/.hg/strip-backup/004dc1679908-06a66a3c-rebase.hg (glob) |
|
399 | 399 | $ hg manifest -r 'desc(F)' |
|
400 | 400 | C |
|
401 | 401 | D |
|
402 | 402 | E |
|
403 | 403 | Z |
|
404 | 404 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
405 | 405 | D |
|
406 | 406 | |
|
407 | 407 | $ hg init $TESTTMP/chosen-merge-base2 |
|
408 | 408 | $ cd $TESTTMP/chosen-merge-base2 |
|
409 | 409 | $ hg debugdrawdag <<'EOS' |
|
410 | 410 | > F |
|
411 | 411 | > /| |
|
412 | 412 | > D E |
|
413 | 413 | > | | |
|
414 | 414 | > B C Z |
|
415 | 415 | > EOS |
|
416 | 416 | $ hg rebase -r E+F -d Z |
|
417 | 417 | rebasing 4:974e4943c210 "E" (E) |
|
418 | 418 | rebasing 5:4be4cbf6f206 "F" (F tip) |
|
419 | 419 | saved backup bundle to $TESTTMP/chosen-merge-base2/.hg/strip-backup/974e4943c210-b2874da5-rebase.hg (glob) |
|
420 | 420 | $ hg manifest -r 'desc(F)' |
|
421 | 421 | B |
|
422 | 422 | D |
|
423 | 423 | E |
|
424 | 424 | Z |
|
425 | 425 | $ hg log -r `hg log -r 'desc(F)' -T '{p1node}'` -T '{desc}\n' |
|
426 | 426 | E |
@@ -1,521 +1,521 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [phases] |
|
6 | 6 | > publish=False |
|
7 | 7 | > |
|
8 | 8 | > [alias] |
|
9 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
9 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | |
|
13 | 13 | $ hg init a |
|
14 | 14 | $ cd a |
|
15 | 15 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
16 | 16 | adding changesets |
|
17 | 17 | adding manifests |
|
18 | 18 | adding file changes |
|
19 | 19 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
20 | 20 | new changesets cd010b8cd998:02de42196ebe |
|
21 | 21 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
22 | 22 | $ hg up tip |
|
23 | 23 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 24 | |
|
25 | 25 | $ echo I > I |
|
26 | 26 | $ hg ci -AmI |
|
27 | 27 | adding I |
|
28 | 28 | |
|
29 | 29 | $ hg tglog |
|
30 | @ 8: 'I' | |
|
30 | @ 8: e7ec4e813ba6 'I' | |
|
31 | 31 | | |
|
32 | o 7: 'H' | |
|
32 | o 7: 02de42196ebe 'H' | |
|
33 | 33 | | |
|
34 | | o 6: 'G' | |
|
34 | | o 6: eea13746799a 'G' | |
|
35 | 35 | |/| |
|
36 | o | 5: 'F' | |
|
36 | o | 5: 24b6387c8c8c 'F' | |
|
37 | 37 | | | |
|
38 | | o 4: 'E' | |
|
38 | | o 4: 9520eea781bc 'E' | |
|
39 | 39 | |/ |
|
40 | | o 3: 'D' | |
|
40 | | o 3: 32af7686d403 'D' | |
|
41 | 41 | | | |
|
42 | | o 2: 'C' | |
|
42 | | o 2: 5fddd98957c8 'C' | |
|
43 | 43 | | | |
|
44 | | o 1: 'B' | |
|
44 | | o 1: 42ccdea3bb16 'B' | |
|
45 | 45 | |/ |
|
46 | o 0: 'A' | |
|
46 | o 0: cd010b8cd998 'A' | |
|
47 | 47 | |
|
48 | 48 | $ cd .. |
|
49 | 49 | |
|
50 | 50 | Version with only two heads (to allow default destination to work) |
|
51 | 51 | |
|
52 | 52 | $ hg clone -q -u . a a2heads -r 3 -r 8 |
|
53 | 53 | |
|
54 | 54 | These fail: |
|
55 | 55 | |
|
56 | 56 | $ hg clone -q -u . a a0 |
|
57 | 57 | $ cd a0 |
|
58 | 58 | |
|
59 | 59 | $ hg rebase -s 8 -d 7 |
|
60 | 60 | nothing to rebase |
|
61 | 61 | [1] |
|
62 | 62 | |
|
63 | 63 | $ hg rebase --continue --abort |
|
64 | 64 | abort: cannot use both abort and continue |
|
65 | 65 | [255] |
|
66 | 66 | |
|
67 | 67 | $ hg rebase --continue --collapse |
|
68 | 68 | abort: cannot use collapse with continue or abort |
|
69 | 69 | [255] |
|
70 | 70 | |
|
71 | 71 | $ hg rebase --continue --dest 4 |
|
72 | 72 | abort: abort and continue do not allow specifying revisions |
|
73 | 73 | [255] |
|
74 | 74 | |
|
75 | 75 | $ hg rebase --base 5 --source 4 |
|
76 | 76 | abort: cannot specify both a source and a base |
|
77 | 77 | [255] |
|
78 | 78 | |
|
79 | 79 | $ hg rebase --rev 5 --source 4 |
|
80 | 80 | abort: cannot specify both a revision and a source |
|
81 | 81 | [255] |
|
82 | 82 | $ hg rebase --base 5 --rev 4 |
|
83 | 83 | abort: cannot specify both a revision and a base |
|
84 | 84 | [255] |
|
85 | 85 | |
|
86 | 86 | $ hg rebase --base 6 |
|
87 | 87 | abort: branch 'default' has 3 heads - please rebase to an explicit rev |
|
88 | 88 | (run 'hg heads .' to see heads) |
|
89 | 89 | [255] |
|
90 | 90 | |
|
91 | 91 | $ hg rebase --rev '1 & !1' --dest 8 |
|
92 | 92 | empty "rev" revision set - nothing to rebase |
|
93 | 93 | [1] |
|
94 | 94 | |
|
95 | 95 | $ hg rebase --source '1 & !1' --dest 8 |
|
96 | 96 | empty "source" revision set - nothing to rebase |
|
97 | 97 | [1] |
|
98 | 98 | |
|
99 | 99 | $ hg rebase --base '1 & !1' --dest 8 |
|
100 | 100 | empty "base" revision set - can't compute rebase set |
|
101 | 101 | [1] |
|
102 | 102 | |
|
103 | 103 | $ hg rebase --dest 8 |
|
104 | 104 | nothing to rebase - working directory parent is also destination |
|
105 | 105 | [1] |
|
106 | 106 | |
|
107 | 107 | $ hg rebase -b . --dest 8 |
|
108 | 108 | nothing to rebase - e7ec4e813ba6 is both "base" and destination |
|
109 | 109 | [1] |
|
110 | 110 | |
|
111 | 111 | $ hg up -q 7 |
|
112 | 112 | |
|
113 | 113 | $ hg rebase --dest 8 --traceback |
|
114 | 114 | nothing to rebase - working directory parent is already an ancestor of destination e7ec4e813ba6 |
|
115 | 115 | [1] |
|
116 | 116 | |
|
117 | 117 | $ hg rebase --dest 8 -b. |
|
118 | 118 | nothing to rebase - "base" 02de42196ebe is already an ancestor of destination e7ec4e813ba6 |
|
119 | 119 | [1] |
|
120 | 120 | |
|
121 | 121 | $ hg rebase --dest '1 & !1' |
|
122 | 122 | abort: empty revision set |
|
123 | 123 | [255] |
|
124 | 124 | |
|
125 | 125 | These work: |
|
126 | 126 | |
|
127 | 127 | Rebase with no arguments (from 3 onto 8): |
|
128 | 128 | |
|
129 | 129 | $ cd .. |
|
130 | 130 | $ hg clone -q -u . a2heads a1 |
|
131 | 131 | $ cd a1 |
|
132 | 132 | $ hg up -q -C 3 |
|
133 | 133 | |
|
134 | 134 | $ hg rebase |
|
135 | 135 | rebasing 1:42ccdea3bb16 "B" |
|
136 | 136 | rebasing 2:5fddd98957c8 "C" |
|
137 | 137 | rebasing 3:32af7686d403 "D" |
|
138 | 138 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
139 | 139 | |
|
140 | 140 | $ hg tglog |
|
141 | @ 6: 'D' | |
|
141 | @ 6: ed65089c18f8 'D' | |
|
142 | 142 | | |
|
143 | o 5: 'C' | |
|
143 | o 5: 7621bf1a2f17 'C' | |
|
144 | 144 | | |
|
145 | o 4: 'B' | |
|
145 | o 4: 9430a62369c6 'B' | |
|
146 | 146 | | |
|
147 | o 3: 'I' | |
|
147 | o 3: e7ec4e813ba6 'I' | |
|
148 | 148 | | |
|
149 | o 2: 'H' | |
|
149 | o 2: 02de42196ebe 'H' | |
|
150 | 150 | | |
|
151 | o 1: 'F' | |
|
151 | o 1: 24b6387c8c8c 'F' | |
|
152 | 152 | | |
|
153 | o 0: 'A' | |
|
153 | o 0: cd010b8cd998 'A' | |
|
154 | 154 | |
|
155 | 155 | Try to rollback after a rebase (fail): |
|
156 | 156 | |
|
157 | 157 | $ hg rollback |
|
158 | 158 | no rollback information available |
|
159 | 159 | [1] |
|
160 | 160 | |
|
161 | 161 | $ cd .. |
|
162 | 162 | |
|
163 | 163 | Rebase with base == '.' => same as no arguments (from 3 onto 8): |
|
164 | 164 | |
|
165 | 165 | $ hg clone -q -u 3 a2heads a2 |
|
166 | 166 | $ cd a2 |
|
167 | 167 | |
|
168 | 168 | $ hg rebase --base . |
|
169 | 169 | rebasing 1:42ccdea3bb16 "B" |
|
170 | 170 | rebasing 2:5fddd98957c8 "C" |
|
171 | 171 | rebasing 3:32af7686d403 "D" |
|
172 | 172 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
173 | 173 | |
|
174 | 174 | $ hg tglog |
|
175 | @ 6: 'D' | |
|
175 | @ 6: ed65089c18f8 'D' | |
|
176 | 176 | | |
|
177 | o 5: 'C' | |
|
177 | o 5: 7621bf1a2f17 'C' | |
|
178 | 178 | | |
|
179 | o 4: 'B' | |
|
179 | o 4: 9430a62369c6 'B' | |
|
180 | 180 | | |
|
181 | o 3: 'I' | |
|
181 | o 3: e7ec4e813ba6 'I' | |
|
182 | 182 | | |
|
183 | o 2: 'H' | |
|
183 | o 2: 02de42196ebe 'H' | |
|
184 | 184 | | |
|
185 | o 1: 'F' | |
|
185 | o 1: 24b6387c8c8c 'F' | |
|
186 | 186 | | |
|
187 | o 0: 'A' | |
|
187 | o 0: cd010b8cd998 'A' | |
|
188 | 188 | |
|
189 | 189 | $ cd .. |
|
190 | 190 | |
|
191 | 191 | |
|
192 | 192 | Rebase with dest == branch(.) => same as no arguments (from 3 onto 8): |
|
193 | 193 | |
|
194 | 194 | $ hg clone -q -u 3 a a3 |
|
195 | 195 | $ cd a3 |
|
196 | 196 | |
|
197 | 197 | $ hg rebase --dest 'branch(.)' |
|
198 | 198 | rebasing 1:42ccdea3bb16 "B" |
|
199 | 199 | rebasing 2:5fddd98957c8 "C" |
|
200 | 200 | rebasing 3:32af7686d403 "D" |
|
201 | 201 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
202 | 202 | |
|
203 | 203 | $ hg tglog |
|
204 | @ 8: 'D' | |
|
204 | @ 8: ed65089c18f8 'D' | |
|
205 | 205 | | |
|
206 | o 7: 'C' | |
|
206 | o 7: 7621bf1a2f17 'C' | |
|
207 | 207 | | |
|
208 | o 6: 'B' | |
|
208 | o 6: 9430a62369c6 'B' | |
|
209 | 209 | | |
|
210 | o 5: 'I' | |
|
210 | o 5: e7ec4e813ba6 'I' | |
|
211 | 211 | | |
|
212 | o 4: 'H' | |
|
212 | o 4: 02de42196ebe 'H' | |
|
213 | 213 | | |
|
214 | | o 3: 'G' | |
|
214 | | o 3: eea13746799a 'G' | |
|
215 | 215 | |/| |
|
216 | o | 2: 'F' | |
|
216 | o | 2: 24b6387c8c8c 'F' | |
|
217 | 217 | | | |
|
218 | | o 1: 'E' | |
|
218 | | o 1: 9520eea781bc 'E' | |
|
219 | 219 | |/ |
|
220 | o 0: 'A' | |
|
220 | o 0: cd010b8cd998 'A' | |
|
221 | 221 | |
|
222 | 222 | $ cd .. |
|
223 | 223 | |
|
224 | 224 | |
|
225 | 225 | Specify only source (from 2 onto 8): |
|
226 | 226 | |
|
227 | 227 | $ hg clone -q -u . a2heads a4 |
|
228 | 228 | $ cd a4 |
|
229 | 229 | |
|
230 | 230 | $ hg rebase --source 'desc("C")' |
|
231 | 231 | rebasing 2:5fddd98957c8 "C" |
|
232 | 232 | rebasing 3:32af7686d403 "D" |
|
233 | 233 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
234 | 234 | |
|
235 | 235 | $ hg tglog |
|
236 | o 6: 'D' | |
|
236 | o 6: 7726e9fd58f7 'D' | |
|
237 | 237 | | |
|
238 | o 5: 'C' | |
|
238 | o 5: 72c8333623d0 'C' | |
|
239 | 239 | | |
|
240 | @ 4: 'I' | |
|
240 | @ 4: e7ec4e813ba6 'I' | |
|
241 | 241 | | |
|
242 | o 3: 'H' | |
|
242 | o 3: 02de42196ebe 'H' | |
|
243 | 243 | | |
|
244 | o 2: 'F' | |
|
244 | o 2: 24b6387c8c8c 'F' | |
|
245 | 245 | | |
|
246 | | o 1: 'B' | |
|
246 | | o 1: 42ccdea3bb16 'B' | |
|
247 | 247 | |/ |
|
248 | o 0: 'A' | |
|
248 | o 0: cd010b8cd998 'A' | |
|
249 | 249 | |
|
250 | 250 | $ cd .. |
|
251 | 251 | |
|
252 | 252 | |
|
253 | 253 | Specify only dest (from 3 onto 6): |
|
254 | 254 | |
|
255 | 255 | $ hg clone -q -u 3 a a5 |
|
256 | 256 | $ cd a5 |
|
257 | 257 | |
|
258 | 258 | $ hg rebase --dest 6 |
|
259 | 259 | rebasing 1:42ccdea3bb16 "B" |
|
260 | 260 | rebasing 2:5fddd98957c8 "C" |
|
261 | 261 | rebasing 3:32af7686d403 "D" |
|
262 | 262 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
263 | 263 | |
|
264 | 264 | $ hg tglog |
|
265 | @ 8: 'D' | |
|
265 | @ 8: 8eeb3c33ad33 'D' | |
|
266 | 266 | | |
|
267 | o 7: 'C' | |
|
267 | o 7: 2327fea05063 'C' | |
|
268 | 268 | | |
|
269 | o 6: 'B' | |
|
269 | o 6: e4e5be0395b2 'B' | |
|
270 | 270 | | |
|
271 | | o 5: 'I' | |
|
271 | | o 5: e7ec4e813ba6 'I' | |
|
272 | 272 | | | |
|
273 | | o 4: 'H' | |
|
273 | | o 4: 02de42196ebe 'H' | |
|
274 | 274 | | | |
|
275 | o | 3: 'G' | |
|
275 | o | 3: eea13746799a 'G' | |
|
276 | 276 | |\| |
|
277 | | o 2: 'F' | |
|
277 | | o 2: 24b6387c8c8c 'F' | |
|
278 | 278 | | | |
|
279 | o | 1: 'E' | |
|
279 | o | 1: 9520eea781bc 'E' | |
|
280 | 280 | |/ |
|
281 | o 0: 'A' | |
|
281 | o 0: cd010b8cd998 'A' | |
|
282 | 282 | |
|
283 | 283 | $ cd .. |
|
284 | 284 | |
|
285 | 285 | |
|
286 | 286 | Specify only base (from 1 onto 8): |
|
287 | 287 | |
|
288 | 288 | $ hg clone -q -u . a2heads a6 |
|
289 | 289 | $ cd a6 |
|
290 | 290 | |
|
291 | 291 | $ hg rebase --base 'desc("D")' |
|
292 | 292 | rebasing 1:42ccdea3bb16 "B" |
|
293 | 293 | rebasing 2:5fddd98957c8 "C" |
|
294 | 294 | rebasing 3:32af7686d403 "D" |
|
295 | 295 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
296 | 296 | |
|
297 | 297 | $ hg tglog |
|
298 | o 6: 'D' | |
|
298 | o 6: ed65089c18f8 'D' | |
|
299 | 299 | | |
|
300 | o 5: 'C' | |
|
300 | o 5: 7621bf1a2f17 'C' | |
|
301 | 301 | | |
|
302 | o 4: 'B' | |
|
302 | o 4: 9430a62369c6 'B' | |
|
303 | 303 | | |
|
304 | @ 3: 'I' | |
|
304 | @ 3: e7ec4e813ba6 'I' | |
|
305 | 305 | | |
|
306 | o 2: 'H' | |
|
306 | o 2: 02de42196ebe 'H' | |
|
307 | 307 | | |
|
308 | o 1: 'F' | |
|
308 | o 1: 24b6387c8c8c 'F' | |
|
309 | 309 | | |
|
310 | o 0: 'A' | |
|
310 | o 0: cd010b8cd998 'A' | |
|
311 | 311 | |
|
312 | 312 | $ cd .. |
|
313 | 313 | |
|
314 | 314 | |
|
315 | 315 | Specify source and dest (from 2 onto 7): |
|
316 | 316 | |
|
317 | 317 | $ hg clone -q -u . a a7 |
|
318 | 318 | $ cd a7 |
|
319 | 319 | |
|
320 | 320 | $ hg rebase --source 2 --dest 7 |
|
321 | 321 | rebasing 2:5fddd98957c8 "C" |
|
322 | 322 | rebasing 3:32af7686d403 "D" |
|
323 | 323 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
324 | 324 | |
|
325 | 325 | $ hg tglog |
|
326 | o 8: 'D' | |
|
326 | o 8: 668acadedd30 'D' | |
|
327 | 327 | | |
|
328 | o 7: 'C' | |
|
328 | o 7: 09eb682ba906 'C' | |
|
329 | 329 | | |
|
330 | | @ 6: 'I' | |
|
330 | | @ 6: e7ec4e813ba6 'I' | |
|
331 | 331 | |/ |
|
332 | o 5: 'H' | |
|
332 | o 5: 02de42196ebe 'H' | |
|
333 | 333 | | |
|
334 | | o 4: 'G' | |
|
334 | | o 4: eea13746799a 'G' | |
|
335 | 335 | |/| |
|
336 | o | 3: 'F' | |
|
336 | o | 3: 24b6387c8c8c 'F' | |
|
337 | 337 | | | |
|
338 | | o 2: 'E' | |
|
338 | | o 2: 9520eea781bc 'E' | |
|
339 | 339 | |/ |
|
340 | | o 1: 'B' | |
|
340 | | o 1: 42ccdea3bb16 'B' | |
|
341 | 341 | |/ |
|
342 | o 0: 'A' | |
|
342 | o 0: cd010b8cd998 'A' | |
|
343 | 343 | |
|
344 | 344 | $ cd .. |
|
345 | 345 | |
|
346 | 346 | |
|
347 | 347 | Specify base and dest (from 1 onto 7): |
|
348 | 348 | |
|
349 | 349 | $ hg clone -q -u . a a8 |
|
350 | 350 | $ cd a8 |
|
351 | 351 | |
|
352 | 352 | $ hg rebase --base 3 --dest 7 |
|
353 | 353 | rebasing 1:42ccdea3bb16 "B" |
|
354 | 354 | rebasing 2:5fddd98957c8 "C" |
|
355 | 355 | rebasing 3:32af7686d403 "D" |
|
356 | 356 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg (glob) |
|
357 | 357 | |
|
358 | 358 | $ hg tglog |
|
359 | o 8: 'D' | |
|
359 | o 8: 287cc92ba5a4 'D' | |
|
360 | 360 | | |
|
361 | o 7: 'C' | |
|
361 | o 7: 6824f610a250 'C' | |
|
362 | 362 | | |
|
363 | o 6: 'B' | |
|
363 | o 6: 7c6027df6a99 'B' | |
|
364 | 364 | | |
|
365 | | @ 5: 'I' | |
|
365 | | @ 5: e7ec4e813ba6 'I' | |
|
366 | 366 | |/ |
|
367 | o 4: 'H' | |
|
367 | o 4: 02de42196ebe 'H' | |
|
368 | 368 | | |
|
369 | | o 3: 'G' | |
|
369 | | o 3: eea13746799a 'G' | |
|
370 | 370 | |/| |
|
371 | o | 2: 'F' | |
|
371 | o | 2: 24b6387c8c8c 'F' | |
|
372 | 372 | | | |
|
373 | | o 1: 'E' | |
|
373 | | o 1: 9520eea781bc 'E' | |
|
374 | 374 | |/ |
|
375 | o 0: 'A' | |
|
375 | o 0: cd010b8cd998 'A' | |
|
376 | 376 | |
|
377 | 377 | $ cd .. |
|
378 | 378 | |
|
379 | 379 | |
|
380 | 380 | Specify only revs (from 2 onto 8) |
|
381 | 381 | |
|
382 | 382 | $ hg clone -q -u . a2heads a9 |
|
383 | 383 | $ cd a9 |
|
384 | 384 | |
|
385 | 385 | $ hg rebase --rev 'desc("C")::' |
|
386 | 386 | rebasing 2:5fddd98957c8 "C" |
|
387 | 387 | rebasing 3:32af7686d403 "D" |
|
388 | 388 | saved backup bundle to $TESTTMP/a9/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
389 | 389 | |
|
390 | 390 | $ hg tglog |
|
391 | o 6: 'D' | |
|
391 | o 6: 7726e9fd58f7 'D' | |
|
392 | 392 | | |
|
393 | o 5: 'C' | |
|
393 | o 5: 72c8333623d0 'C' | |
|
394 | 394 | | |
|
395 | @ 4: 'I' | |
|
395 | @ 4: e7ec4e813ba6 'I' | |
|
396 | 396 | | |
|
397 | o 3: 'H' | |
|
397 | o 3: 02de42196ebe 'H' | |
|
398 | 398 | | |
|
399 | o 2: 'F' | |
|
399 | o 2: 24b6387c8c8c 'F' | |
|
400 | 400 | | |
|
401 | | o 1: 'B' | |
|
401 | | o 1: 42ccdea3bb16 'B' | |
|
402 | 402 | |/ |
|
403 | o 0: 'A' | |
|
403 | o 0: cd010b8cd998 'A' | |
|
404 | 404 | |
|
405 | 405 | $ cd .. |
|
406 | 406 | |
|
407 | 407 | Rebasing both a single revision and a merge in one command |
|
408 | 408 | |
|
409 | 409 | $ hg clone -q -u . a aX |
|
410 | 410 | $ cd aX |
|
411 | 411 | $ hg rebase -r 3 -r 6 --dest 8 |
|
412 | 412 | rebasing 3:32af7686d403 "D" |
|
413 | 413 | rebasing 6:eea13746799a "G" |
|
414 | 414 | saved backup bundle to $TESTTMP/aX/.hg/strip-backup/eea13746799a-ad273fd6-rebase.hg (glob) |
|
415 | 415 | $ cd .. |
|
416 | 416 | |
|
417 | 417 | Test --tool parameter: |
|
418 | 418 | |
|
419 | 419 | $ hg init b |
|
420 | 420 | $ cd b |
|
421 | 421 | |
|
422 | 422 | $ echo c1 > c1 |
|
423 | 423 | $ hg ci -Am c1 |
|
424 | 424 | adding c1 |
|
425 | 425 | |
|
426 | 426 | $ echo c2 > c2 |
|
427 | 427 | $ hg ci -Am c2 |
|
428 | 428 | adding c2 |
|
429 | 429 | |
|
430 | 430 | $ hg up -q 0 |
|
431 | 431 | $ echo c2b > c2 |
|
432 | 432 | $ hg ci -Am c2b |
|
433 | 433 | adding c2 |
|
434 | 434 | created new head |
|
435 | 435 | |
|
436 | 436 | $ cd .. |
|
437 | 437 | |
|
438 | 438 | $ hg clone -q -u . b b1 |
|
439 | 439 | $ cd b1 |
|
440 | 440 | |
|
441 | 441 | $ hg rebase -s 2 -d 1 --tool internal:local |
|
442 | 442 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
443 | 443 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
444 | 444 | saved backup bundle to $TESTTMP/b1/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
445 | 445 | |
|
446 | 446 | $ hg cat c2 |
|
447 | 447 | c2 |
|
448 | 448 | |
|
449 | 449 | $ cd .. |
|
450 | 450 | |
|
451 | 451 | |
|
452 | 452 | $ hg clone -q -u . b b2 |
|
453 | 453 | $ cd b2 |
|
454 | 454 | |
|
455 | 455 | $ hg rebase -s 2 -d 1 --tool internal:other |
|
456 | 456 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
457 | 457 | saved backup bundle to $TESTTMP/b2/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
458 | 458 | |
|
459 | 459 | $ hg cat c2 |
|
460 | 460 | c2b |
|
461 | 461 | |
|
462 | 462 | $ cd .. |
|
463 | 463 | |
|
464 | 464 | |
|
465 | 465 | $ hg clone -q -u . b b3 |
|
466 | 466 | $ cd b3 |
|
467 | 467 | |
|
468 | 468 | $ hg rebase -s 2 -d 1 --tool internal:fail |
|
469 | 469 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
470 | 470 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
471 | 471 | [1] |
|
472 | 472 | |
|
473 | 473 | $ hg summary |
|
474 | 474 | parent: 1:56daeba07f4b |
|
475 | 475 | c2 |
|
476 | 476 | parent: 2:e4e3f3546619 tip |
|
477 | 477 | c2b |
|
478 | 478 | branch: default |
|
479 | 479 | commit: 1 modified, 1 unresolved (merge) |
|
480 | 480 | update: (current) |
|
481 | 481 | phases: 3 draft |
|
482 | 482 | rebase: 0 rebased, 1 remaining (rebase --continue) |
|
483 | 483 | |
|
484 | 484 | $ hg resolve -l |
|
485 | 485 | U c2 |
|
486 | 486 | |
|
487 | 487 | $ hg resolve -m c2 |
|
488 | 488 | (no more unresolved files) |
|
489 | 489 | continue: hg rebase --continue |
|
490 | 490 | $ hg graft --continue |
|
491 | 491 | abort: no graft in progress |
|
492 | 492 | (continue: hg rebase --continue) |
|
493 | 493 | [255] |
|
494 | 494 | $ hg rebase -c --tool internal:fail |
|
495 | 495 | rebasing 2:e4e3f3546619 "c2b" (tip) |
|
496 | 496 | note: rebase of 2:e4e3f3546619 created no changes to commit |
|
497 | 497 | saved backup bundle to $TESTTMP/b3/.hg/strip-backup/e4e3f3546619-b0841178-rebase.hg (glob) |
|
498 | 498 | |
|
499 | 499 | $ hg rebase -i |
|
500 | 500 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
501 | 501 | [255] |
|
502 | 502 | |
|
503 | 503 | $ hg rebase --interactive |
|
504 | 504 | abort: interactive history editing is supported by the 'histedit' extension (see "hg --config extensions.histedit= help -e histedit") |
|
505 | 505 | [255] |
|
506 | 506 | |
|
507 | 507 | $ cd .. |
|
508 | 508 | |
|
509 | 509 | No common ancestor |
|
510 | 510 | |
|
511 | 511 | $ hg init separaterepo |
|
512 | 512 | $ cd separaterepo |
|
513 | 513 | $ touch a |
|
514 | 514 | $ hg commit -Aqm a |
|
515 | 515 | $ hg up -q null |
|
516 | 516 | $ touch b |
|
517 | 517 | $ hg commit -Aqm b |
|
518 | 518 | $ hg rebase -d 0 |
|
519 | 519 | nothing to rebase from d7486e00c6f1 to 3903775176ed |
|
520 | 520 | [1] |
|
521 | 521 | $ cd .. |
@@ -1,95 +1,95 b'' | |||
|
1 | 1 | Tests rebasing with part of the rebase set already in the |
|
2 | 2 | destination (issue5422) |
|
3 | 3 | |
|
4 | 4 | $ cat >> $HGRCPATH <<EOF |
|
5 | 5 | > [extensions] |
|
6 | 6 | > rebase= |
|
7 | 7 | > drawdag=$TESTDIR/drawdag.py |
|
8 | 8 | > |
|
9 | 9 | > [experimental] |
|
10 | 10 | > evolution.createmarkers=True |
|
11 | 11 | > evolution.allowunstable=True |
|
12 | 12 | > |
|
13 | 13 | > [alias] |
|
14 | > tglog = log -G --template "{rev}: {desc}" | |
|
14 | > tglog = log -G --template "{rev}: {node|short} {desc}" | |
|
15 | 15 | > EOF |
|
16 | 16 | |
|
17 | 17 | $ rebasewithdag() { |
|
18 | 18 | > N=`$PYTHON -c "print($N+1)"` |
|
19 | 19 | > hg init repo$N && cd repo$N |
|
20 | 20 | > hg debugdrawdag |
|
21 | 21 | > hg rebase "$@" > _rebasetmp |
|
22 | 22 | > r=$? |
|
23 | 23 | > grep -v 'saved backup bundle' _rebasetmp |
|
24 | 24 | > [ $r -eq 0 ] && hg tglog |
|
25 | 25 | > cd .. |
|
26 | 26 | > return $r |
|
27 | 27 | > } |
|
28 | 28 | |
|
29 | 29 | Rebase two commits, of which one is already in the right place |
|
30 | 30 | |
|
31 | 31 | $ rebasewithdag -r C+D -d B <<EOF |
|
32 | 32 | > C |
|
33 | 33 | > | |
|
34 | 34 | > B D |
|
35 | 35 | > |/ |
|
36 | 36 | > A |
|
37 | 37 | > EOF |
|
38 | 38 | rebasing 2:b18e25de2cf5 "D" (D) |
|
39 | 39 | already rebased 3:26805aba1e60 "C" (C tip) |
|
40 | o 4: D | |
|
40 | o 4: fe3b4c6498fa D | |
|
41 | 41 | | |
|
42 | | o 3: C | |
|
42 | | o 3: 26805aba1e60 C | |
|
43 | 43 | |/ |
|
44 | | x 2: D | |
|
44 | | x 2: b18e25de2cf5 D | |
|
45 | 45 | | | |
|
46 | o | 1: B | |
|
46 | o | 1: 112478962961 B | |
|
47 | 47 | |/ |
|
48 | o 0: A | |
|
48 | o 0: 426bada5c675 A | |
|
49 | 49 | |
|
50 | 50 | Can collapse commits even if one is already in the right place |
|
51 | 51 | |
|
52 | 52 | $ rebasewithdag --collapse -r C+D -d B <<EOF |
|
53 | 53 | > C |
|
54 | 54 | > | |
|
55 | 55 | > B D |
|
56 | 56 | > |/ |
|
57 | 57 | > A |
|
58 | 58 | > EOF |
|
59 | 59 | rebasing 2:b18e25de2cf5 "D" (D) |
|
60 | 60 | rebasing 3:26805aba1e60 "C" (C tip) |
|
61 | o 4: Collapsed revision | |
|
61 | o 4: a2493f4ace65 Collapsed revision | |
|
62 | 62 | | * D |
|
63 | 63 | | * C |
|
64 | | x 3: C | |
|
64 | | x 3: 26805aba1e60 C | |
|
65 | 65 | |/ |
|
66 | | x 2: D | |
|
66 | | x 2: b18e25de2cf5 D | |
|
67 | 67 | | | |
|
68 | o | 1: B | |
|
68 | o | 1: 112478962961 B | |
|
69 | 69 | |/ |
|
70 | o 0: A | |
|
70 | o 0: 426bada5c675 A | |
|
71 | 71 | |
|
72 | 72 | Rebase with "holes". The commits after the hole should end up on the parent of |
|
73 | 73 | the hole (B below), not on top of the destination (A). |
|
74 | 74 | |
|
75 | 75 | $ rebasewithdag -r B+D -d A <<EOF |
|
76 | 76 | > D |
|
77 | 77 | > | |
|
78 | 78 | > C |
|
79 | 79 | > | |
|
80 | 80 | > B |
|
81 | 81 | > | |
|
82 | 82 | > A |
|
83 | 83 | > EOF |
|
84 | 84 | already rebased 1:112478962961 "B" (B) |
|
85 | 85 | rebasing 3:f585351a92f8 "D" (D tip) |
|
86 | o 4: D | |
|
86 | o 4: 1e6da8103bc7 D | |
|
87 | 87 | | |
|
88 | | x 3: D | |
|
88 | | x 3: f585351a92f8 D | |
|
89 | 89 | | | |
|
90 | | o 2: C | |
|
90 | | o 2: 26805aba1e60 C | |
|
91 | 91 | |/ |
|
92 | o 1: B | |
|
92 | o 1: 112478962961 B | |
|
93 | 93 | | |
|
94 | o 0: A | |
|
94 | o 0: 426bada5c675 A | |
|
95 | 95 |
@@ -1,460 +1,460 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > histedit= |
|
5 | 5 | > |
|
6 | 6 | > [alias] |
|
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
7 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
8 | 8 | > EOF |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | $ hg init a |
|
12 | 12 | $ cd a |
|
13 | 13 | |
|
14 | 14 | $ echo C1 > C1 |
|
15 | 15 | $ hg ci -Am C1 |
|
16 | 16 | adding C1 |
|
17 | 17 | |
|
18 | 18 | $ echo C2 > C2 |
|
19 | 19 | $ hg ci -Am C2 |
|
20 | 20 | adding C2 |
|
21 | 21 | |
|
22 | 22 | $ cd .. |
|
23 | 23 | |
|
24 | 24 | $ hg clone a b |
|
25 | 25 | updating to branch default |
|
26 | 26 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | |
|
28 | 28 | $ hg clone a c |
|
29 | 29 | updating to branch default |
|
30 | 30 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 31 | |
|
32 | 32 | $ cd b |
|
33 | 33 | |
|
34 | 34 | $ echo L1 > L1 |
|
35 | 35 | $ hg ci -Am L1 |
|
36 | 36 | adding L1 |
|
37 | 37 | |
|
38 | 38 | |
|
39 | 39 | $ cd ../a |
|
40 | 40 | |
|
41 | 41 | $ echo R1 > R1 |
|
42 | 42 | $ hg ci -Am R1 |
|
43 | 43 | adding R1 |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | $ cd ../b |
|
47 | 47 | |
|
48 | 48 | Now b has one revision to be pulled from a: |
|
49 | 49 | |
|
50 | 50 | $ hg pull --rebase |
|
51 | 51 | pulling from $TESTTMP/a (glob) |
|
52 | 52 | searching for changes |
|
53 | 53 | adding changesets |
|
54 | 54 | adding manifests |
|
55 | 55 | adding file changes |
|
56 | 56 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
57 | 57 | new changesets 77ae9631bcca |
|
58 | 58 | rebasing 2:ff8d69a621f9 "L1" |
|
59 | 59 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
|
60 | 60 | |
|
61 | 61 | $ hg tglog |
|
62 | @ 3: 'L1' | |
|
62 | @ 3: d80cc2da061e 'L1' | |
|
63 | 63 | | |
|
64 | o 2: 'R1' | |
|
64 | o 2: 77ae9631bcca 'R1' | |
|
65 | 65 | | |
|
66 | o 1: 'C2' | |
|
66 | o 1: 783333faa078 'C2' | |
|
67 | 67 | | |
|
68 | o 0: 'C1' | |
|
68 | o 0: 05d58a0c15dd 'C1' | |
|
69 | 69 | |
|
70 | 70 | Re-run: |
|
71 | 71 | |
|
72 | 72 | $ hg pull --rebase |
|
73 | 73 | pulling from $TESTTMP/a (glob) |
|
74 | 74 | searching for changes |
|
75 | 75 | no changes found |
|
76 | 76 | |
|
77 | 77 | Abort pull early if working dir is not clean: |
|
78 | 78 | |
|
79 | 79 | $ echo L1-mod > L1 |
|
80 | 80 | $ hg pull --rebase |
|
81 | 81 | abort: uncommitted changes |
|
82 | 82 | (cannot pull with rebase: please commit or shelve your changes first) |
|
83 | 83 | [255] |
|
84 | 84 | $ hg update --clean --quiet |
|
85 | 85 | |
|
86 | 86 | Abort pull early if another operation (histedit) is in progress: |
|
87 | 87 | |
|
88 | 88 | $ hg histedit . -q --commands - << EOF |
|
89 | 89 | > edit d80cc2da061e histedit: generate unfinished state |
|
90 | 90 | > EOF |
|
91 | 91 | Editing (d80cc2da061e), you may commit or record as needed now. |
|
92 | 92 | (hg histedit --continue to resume) |
|
93 | 93 | [1] |
|
94 | 94 | $ hg pull --rebase |
|
95 | 95 | abort: histedit in progress |
|
96 | 96 | (use 'hg histedit --continue' or 'hg histedit --abort') |
|
97 | 97 | [255] |
|
98 | 98 | $ hg histedit --abort --quiet |
|
99 | 99 | |
|
100 | 100 | Abort pull early with pending uncommitted merge: |
|
101 | 101 | |
|
102 | 102 | $ cd .. |
|
103 | 103 | $ hg clone --noupdate c d |
|
104 | 104 | $ cd d |
|
105 | 105 | $ hg tglog |
|
106 | o 1: 'C2' | |
|
106 | o 1: 783333faa078 'C2' | |
|
107 | 107 | | |
|
108 | o 0: 'C1' | |
|
108 | o 0: 05d58a0c15dd 'C1' | |
|
109 | 109 | |
|
110 | 110 | $ hg update --quiet 0 |
|
111 | 111 | $ echo M1 > M1 |
|
112 | 112 | $ hg commit --quiet -Am M1 |
|
113 | 113 | $ hg update --quiet 1 |
|
114 | 114 | $ hg merge 2 |
|
115 | 115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 116 | (branch merge, don't forget to commit) |
|
117 | 117 | $ hg pull --rebase |
|
118 | 118 | abort: outstanding uncommitted merge |
|
119 | 119 | (cannot pull with rebase: please commit or shelve your changes first) |
|
120 | 120 | [255] |
|
121 | 121 | $ hg update --clean --quiet |
|
122 | 122 | |
|
123 | 123 | Abort pull early with unclean subrepo: |
|
124 | 124 | $ echo s = s > .hgsub |
|
125 | 125 | $ hg add .hgsub |
|
126 | 126 | $ hg init s |
|
127 | 127 | $ hg commit -m "generated a subrepo" |
|
128 | 128 | $ echo a > s/a |
|
129 | 129 | $ hg -R s add s/a |
|
130 | 130 | $ hg pull --rebase |
|
131 | 131 | abort: uncommitted changes in subrepository "s" |
|
132 | 132 | (cannot pull with rebase: please commit or shelve your changes first) |
|
133 | 133 | [255] |
|
134 | 134 | |
|
135 | 135 | Invoke pull --rebase and nothing to rebase: |
|
136 | 136 | |
|
137 | 137 | $ cd ../c |
|
138 | 138 | |
|
139 | 139 | $ hg book norebase |
|
140 | 140 | $ hg pull --rebase |
|
141 | 141 | pulling from $TESTTMP/a (glob) |
|
142 | 142 | searching for changes |
|
143 | 143 | adding changesets |
|
144 | 144 | adding manifests |
|
145 | 145 | adding file changes |
|
146 | 146 | added 1 changesets with 1 changes to 1 files |
|
147 | 147 | new changesets 77ae9631bcca |
|
148 | 148 | nothing to rebase - updating instead |
|
149 | 149 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
150 | 150 | updating bookmark norebase |
|
151 | 151 | |
|
152 | 152 | $ hg tglog -l 1 |
|
153 | @ 2: 'R1' | |
|
153 | @ 2: 77ae9631bcca 'R1' | |
|
154 | 154 | | |
|
155 | 155 | ~ |
|
156 | 156 | |
|
157 | 157 | pull --rebase --update should ignore --update: |
|
158 | 158 | |
|
159 | 159 | $ hg pull --rebase --update |
|
160 | 160 | pulling from $TESTTMP/a (glob) |
|
161 | 161 | searching for changes |
|
162 | 162 | no changes found |
|
163 | 163 | |
|
164 | 164 | pull --rebase doesn't update if nothing has been pulled: |
|
165 | 165 | |
|
166 | 166 | $ hg up -q 1 |
|
167 | 167 | |
|
168 | 168 | $ hg pull --rebase |
|
169 | 169 | pulling from $TESTTMP/a (glob) |
|
170 | 170 | searching for changes |
|
171 | 171 | no changes found |
|
172 | 172 | |
|
173 | 173 | $ hg tglog -l 1 |
|
174 | o 2: 'R1' | |
|
174 | o 2: 77ae9631bcca 'R1' | |
|
175 | 175 | | |
|
176 | 176 | ~ |
|
177 | 177 | |
|
178 | 178 | $ cd .. |
|
179 | 179 | |
|
180 | 180 | pull --rebase works when a specific revision is pulled (issue3619) |
|
181 | 181 | |
|
182 | 182 | $ cd a |
|
183 | 183 | $ hg tglog |
|
184 | @ 2: 'R1' | |
|
184 | @ 2: 77ae9631bcca 'R1' | |
|
185 | 185 | | |
|
186 | o 1: 'C2' | |
|
186 | o 1: 783333faa078 'C2' | |
|
187 | 187 | | |
|
188 | o 0: 'C1' | |
|
188 | o 0: 05d58a0c15dd 'C1' | |
|
189 | 189 | |
|
190 | 190 | $ echo R2 > R2 |
|
191 | 191 | $ hg ci -Am R2 |
|
192 | 192 | adding R2 |
|
193 | 193 | $ echo R3 > R3 |
|
194 | 194 | $ hg ci -Am R3 |
|
195 | 195 | adding R3 |
|
196 | 196 | $ cd ../c |
|
197 | 197 | $ hg tglog |
|
198 | o 2: 'R1' | |
|
198 | o 2: 77ae9631bcca 'R1' | |
|
199 | 199 | | |
|
200 | @ 1: 'C2' | |
|
200 | @ 1: 783333faa078 'C2' | |
|
201 | 201 | | |
|
202 | o 0: 'C1' | |
|
202 | o 0: 05d58a0c15dd 'C1' | |
|
203 | 203 | |
|
204 | 204 | $ echo L1 > L1 |
|
205 | 205 | $ hg ci -Am L1 |
|
206 | 206 | adding L1 |
|
207 | 207 | created new head |
|
208 | 208 | $ hg pull --rev tip --rebase |
|
209 | 209 | pulling from $TESTTMP/a (glob) |
|
210 | 210 | searching for changes |
|
211 | 211 | adding changesets |
|
212 | 212 | adding manifests |
|
213 | 213 | adding file changes |
|
214 | 214 | added 2 changesets with 2 changes to 2 files |
|
215 | 215 | new changesets 31cd3a05214e:770a61882ace |
|
216 | 216 | rebasing 3:ff8d69a621f9 "L1" |
|
217 | 217 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/ff8d69a621f9-160fa373-rebase.hg (glob) |
|
218 | 218 | $ hg tglog |
|
219 | @ 5: 'L1' | |
|
219 | @ 5: 518d153c0ba3 'L1' | |
|
220 | 220 | | |
|
221 | o 4: 'R3' | |
|
221 | o 4: 770a61882ace 'R3' | |
|
222 | 222 | | |
|
223 | o 3: 'R2' | |
|
223 | o 3: 31cd3a05214e 'R2' | |
|
224 | 224 | | |
|
225 | o 2: 'R1' | |
|
225 | o 2: 77ae9631bcca 'R1' | |
|
226 | 226 | | |
|
227 | o 1: 'C2' | |
|
227 | o 1: 783333faa078 'C2' | |
|
228 | 228 | | |
|
229 | o 0: 'C1' | |
|
229 | o 0: 05d58a0c15dd 'C1' | |
|
230 | 230 | |
|
231 | 231 | pull --rebase works with bundle2 turned on |
|
232 | 232 | |
|
233 | 233 | $ cd ../a |
|
234 | 234 | $ echo R4 > R4 |
|
235 | 235 | $ hg ci -Am R4 |
|
236 | 236 | adding R4 |
|
237 | 237 | $ hg tglog |
|
238 | @ 5: 'R4' | |
|
238 | @ 5: 00e3b7781125 'R4' | |
|
239 | 239 | | |
|
240 | o 4: 'R3' | |
|
240 | o 4: 770a61882ace 'R3' | |
|
241 | 241 | | |
|
242 | o 3: 'R2' | |
|
242 | o 3: 31cd3a05214e 'R2' | |
|
243 | 243 | | |
|
244 | o 2: 'R1' | |
|
244 | o 2: 77ae9631bcca 'R1' | |
|
245 | 245 | | |
|
246 | o 1: 'C2' | |
|
246 | o 1: 783333faa078 'C2' | |
|
247 | 247 | | |
|
248 | o 0: 'C1' | |
|
248 | o 0: 05d58a0c15dd 'C1' | |
|
249 | 249 | |
|
250 | 250 | $ cd ../c |
|
251 | 251 | $ hg pull --rebase |
|
252 | 252 | pulling from $TESTTMP/a (glob) |
|
253 | 253 | searching for changes |
|
254 | 254 | adding changesets |
|
255 | 255 | adding manifests |
|
256 | 256 | adding file changes |
|
257 | 257 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
258 | 258 | new changesets 00e3b7781125 |
|
259 | 259 | rebasing 5:518d153c0ba3 "L1" |
|
260 | 260 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-rebase.hg (glob) |
|
261 | 261 | $ hg tglog |
|
262 | @ 6: 'L1' | |
|
262 | @ 6: 0d0727eb7ce0 'L1' | |
|
263 | 263 | | |
|
264 | o 5: 'R4' | |
|
264 | o 5: 00e3b7781125 'R4' | |
|
265 | 265 | | |
|
266 | o 4: 'R3' | |
|
266 | o 4: 770a61882ace 'R3' | |
|
267 | 267 | | |
|
268 | o 3: 'R2' | |
|
268 | o 3: 31cd3a05214e 'R2' | |
|
269 | 269 | | |
|
270 | o 2: 'R1' | |
|
270 | o 2: 77ae9631bcca 'R1' | |
|
271 | 271 | | |
|
272 | o 1: 'C2' | |
|
272 | o 1: 783333faa078 'C2' | |
|
273 | 273 | | |
|
274 | o 0: 'C1' | |
|
274 | o 0: 05d58a0c15dd 'C1' | |
|
275 | 275 | |
|
276 | 276 | |
|
277 | 277 | pull --rebase only update if there is nothing to rebase |
|
278 | 278 | |
|
279 | 279 | $ cd ../a |
|
280 | 280 | $ echo R5 > R5 |
|
281 | 281 | $ hg ci -Am R5 |
|
282 | 282 | adding R5 |
|
283 | 283 | $ hg tglog |
|
284 | @ 6: 'R5' | |
|
284 | @ 6: 88dd24261747 'R5' | |
|
285 | 285 | | |
|
286 | o 5: 'R4' | |
|
286 | o 5: 00e3b7781125 'R4' | |
|
287 | 287 | | |
|
288 | o 4: 'R3' | |
|
288 | o 4: 770a61882ace 'R3' | |
|
289 | 289 | | |
|
290 | o 3: 'R2' | |
|
290 | o 3: 31cd3a05214e 'R2' | |
|
291 | 291 | | |
|
292 | o 2: 'R1' | |
|
292 | o 2: 77ae9631bcca 'R1' | |
|
293 | 293 | | |
|
294 | o 1: 'C2' | |
|
294 | o 1: 783333faa078 'C2' | |
|
295 | 295 | | |
|
296 | o 0: 'C1' | |
|
296 | o 0: 05d58a0c15dd 'C1' | |
|
297 | 297 | |
|
298 | 298 | $ cd ../c |
|
299 | 299 | $ echo L2 > L2 |
|
300 | 300 | $ hg ci -Am L2 |
|
301 | 301 | adding L2 |
|
302 | 302 | $ hg up 'desc(L1)' |
|
303 | 303 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
304 | 304 | $ hg pull --rebase |
|
305 | 305 | pulling from $TESTTMP/a (glob) |
|
306 | 306 | searching for changes |
|
307 | 307 | adding changesets |
|
308 | 308 | adding manifests |
|
309 | 309 | adding file changes |
|
310 | 310 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
311 | 311 | new changesets 88dd24261747 |
|
312 | 312 | rebasing 6:0d0727eb7ce0 "L1" |
|
313 | 313 | rebasing 7:c1f58876e3bf "L2" |
|
314 | 314 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/0d0727eb7ce0-ef61ccb2-rebase.hg (glob) |
|
315 | 315 | $ hg tglog |
|
316 | o 8: 'L2' | |
|
316 | o 8: 6dc0ea5dcf55 'L2' | |
|
317 | 317 | | |
|
318 | @ 7: 'L1' | |
|
318 | @ 7: 864e0a2d2614 'L1' | |
|
319 | 319 | | |
|
320 | o 6: 'R5' | |
|
320 | o 6: 88dd24261747 'R5' | |
|
321 | 321 | | |
|
322 | o 5: 'R4' | |
|
322 | o 5: 00e3b7781125 'R4' | |
|
323 | 323 | | |
|
324 | o 4: 'R3' | |
|
324 | o 4: 770a61882ace 'R3' | |
|
325 | 325 | | |
|
326 | o 3: 'R2' | |
|
326 | o 3: 31cd3a05214e 'R2' | |
|
327 | 327 | | |
|
328 | o 2: 'R1' | |
|
328 | o 2: 77ae9631bcca 'R1' | |
|
329 | 329 | | |
|
330 | o 1: 'C2' | |
|
330 | o 1: 783333faa078 'C2' | |
|
331 | 331 | | |
|
332 | o 0: 'C1' | |
|
332 | o 0: 05d58a0c15dd 'C1' | |
|
333 | 333 | |
|
334 | 334 | |
|
335 | 335 | pull --rebase update (no rebase) use proper update: |
|
336 | 336 | |
|
337 | 337 | - warn about other head. |
|
338 | 338 | |
|
339 | 339 | $ cd ../a |
|
340 | 340 | $ echo R6 > R6 |
|
341 | 341 | $ hg ci -Am R6 |
|
342 | 342 | adding R6 |
|
343 | 343 | $ cd ../c |
|
344 | 344 | $ hg up 'desc(R5)' |
|
345 | 345 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
346 | 346 | $ hg pull --rebase |
|
347 | 347 | pulling from $TESTTMP/a (glob) |
|
348 | 348 | searching for changes |
|
349 | 349 | adding changesets |
|
350 | 350 | adding manifests |
|
351 | 351 | adding file changes |
|
352 | 352 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
353 | 353 | new changesets 65bc164c1d9b |
|
354 | 354 | nothing to rebase - updating instead |
|
355 | 355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 356 | updated to "65bc164c1d9b: R6" |
|
357 | 357 | 1 other heads for branch "default" |
|
358 | 358 | $ hg tglog |
|
359 | @ 9: 'R6' | |
|
359 | @ 9: 65bc164c1d9b 'R6' | |
|
360 | 360 | | |
|
361 | | o 8: 'L2' | |
|
361 | | o 8: 6dc0ea5dcf55 'L2' | |
|
362 | 362 | | | |
|
363 | | o 7: 'L1' | |
|
363 | | o 7: 864e0a2d2614 'L1' | |
|
364 | 364 | |/ |
|
365 | o 6: 'R5' | |
|
365 | o 6: 88dd24261747 'R5' | |
|
366 | 366 | | |
|
367 | o 5: 'R4' | |
|
367 | o 5: 00e3b7781125 'R4' | |
|
368 | 368 | | |
|
369 | o 4: 'R3' | |
|
369 | o 4: 770a61882ace 'R3' | |
|
370 | 370 | | |
|
371 | o 3: 'R2' | |
|
371 | o 3: 31cd3a05214e 'R2' | |
|
372 | 372 | | |
|
373 | o 2: 'R1' | |
|
373 | o 2: 77ae9631bcca 'R1' | |
|
374 | 374 | | |
|
375 | o 1: 'C2' | |
|
375 | o 1: 783333faa078 'C2' | |
|
376 | 376 | | |
|
377 | o 0: 'C1' | |
|
377 | o 0: 05d58a0c15dd 'C1' | |
|
378 | 378 | |
|
379 | 379 | |
|
380 | 380 | Multiple pre-existing heads on the branch |
|
381 | 381 | ----------------------------------------- |
|
382 | 382 | |
|
383 | 383 | Pull bring content, but nothing on the current branch, we should not consider |
|
384 | 384 | pre-existing heads. |
|
385 | 385 | |
|
386 | 386 | $ cd ../a |
|
387 | 387 | $ hg branch unrelatedbranch |
|
388 | 388 | marked working directory as branch unrelatedbranch |
|
389 | 389 | (branches are permanent and global, did you want a bookmark?) |
|
390 | 390 | $ echo B1 > B1 |
|
391 | 391 | $ hg commit -Am B1 |
|
392 | 392 | adding B1 |
|
393 | 393 | $ cd ../c |
|
394 | 394 | $ hg up 'desc(L2)' |
|
395 | 395 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
396 | 396 | $ hg pull --rebase |
|
397 | 397 | pulling from $TESTTMP/a (glob) |
|
398 | 398 | searching for changes |
|
399 | 399 | adding changesets |
|
400 | 400 | adding manifests |
|
401 | 401 | adding file changes |
|
402 | 402 | added 1 changesets with 1 changes to 1 files |
|
403 | 403 | new changesets 39c381359968 |
|
404 | 404 | nothing to rebase |
|
405 | 405 | |
|
406 | 406 | There is two local heads and we pull a third one. |
|
407 | 407 | The second local head should not confuse the `hg pull rebase`. |
|
408 | 408 | |
|
409 | 409 | $ hg up 'desc(R6)' |
|
410 | 410 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
411 | 411 | $ echo M1 > M1 |
|
412 | 412 | $ hg commit -Am M1 |
|
413 | 413 | adding M1 |
|
414 | 414 | $ cd ../a |
|
415 | 415 | $ hg up 'desc(R6)' |
|
416 | 416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
417 | 417 | $ echo R7 > R7 |
|
418 | 418 | $ hg commit -Am R7 |
|
419 | 419 | adding R7 |
|
420 | 420 | $ cd ../c |
|
421 | 421 | $ hg up 'desc(L2)' |
|
422 | 422 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
423 | 423 | $ hg pull --rebase |
|
424 | 424 | pulling from $TESTTMP/a (glob) |
|
425 | 425 | searching for changes |
|
426 | 426 | adding changesets |
|
427 | 427 | adding manifests |
|
428 | 428 | adding file changes |
|
429 | 429 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
430 | 430 | new changesets f7d3e42052f9 |
|
431 | 431 | rebasing 7:864e0a2d2614 "L1" |
|
432 | 432 | rebasing 8:6dc0ea5dcf55 "L2" |
|
433 | 433 | saved backup bundle to $TESTTMP/c/.hg/strip-backup/864e0a2d2614-2f72c89c-rebase.hg (glob) |
|
434 | 434 | $ hg tglog |
|
435 | @ 12: 'L2' | |
|
435 | @ 12: 3603a865eea0 'L2' | |
|
436 | 436 | | |
|
437 | o 11: 'L1' | |
|
437 | o 11: bcc8a9cd04bf 'L1' | |
|
438 | 438 | | |
|
439 | o 10: 'R7' | |
|
439 | o 10: f7d3e42052f9 'R7' | |
|
440 | 440 | | |
|
441 | | o 9: 'M1' | |
|
441 | | o 9: 41fab4eef82f 'M1' | |
|
442 | 442 | |/ |
|
443 | | o 8: 'B1' unrelatedbranch | |
|
443 | | o 8: 39c381359968 'B1' unrelatedbranch | |
|
444 | 444 | |/ |
|
445 | o 7: 'R6' | |
|
445 | o 7: 65bc164c1d9b 'R6' | |
|
446 | 446 | | |
|
447 | o 6: 'R5' | |
|
447 | o 6: 88dd24261747 'R5' | |
|
448 | 448 | | |
|
449 | o 5: 'R4' | |
|
449 | o 5: 00e3b7781125 'R4' | |
|
450 | 450 | | |
|
451 | o 4: 'R3' | |
|
451 | o 4: 770a61882ace 'R3' | |
|
452 | 452 | | |
|
453 | o 3: 'R2' | |
|
453 | o 3: 31cd3a05214e 'R2' | |
|
454 | 454 | | |
|
455 | o 2: 'R1' | |
|
455 | o 2: 77ae9631bcca 'R1' | |
|
456 | 456 | | |
|
457 | o 1: 'C2' | |
|
457 | o 1: 783333faa078 'C2' | |
|
458 | 458 | | |
|
459 | o 0: 'C1' | |
|
459 | o 0: 05d58a0c15dd 'C1' | |
|
460 | 460 |
@@ -1,332 +1,332 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > |
|
5 | 5 | > [alias] |
|
6 |
> tlog = log |
|
|
6 | > tlog = log --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
7 | 7 | > tglog = tlog --graph |
|
8 | 8 | > EOF |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | $ hg init a |
|
12 | 12 | $ cd a |
|
13 | 13 | |
|
14 | 14 | $ mkdir d |
|
15 | 15 | $ echo a > a |
|
16 | 16 | $ hg ci -Am A |
|
17 | 17 | adding a |
|
18 | 18 | |
|
19 | 19 | $ echo b > d/b |
|
20 | 20 | $ hg ci -Am B |
|
21 | 21 | adding d/b |
|
22 | 22 | |
|
23 | 23 | $ hg mv d d-renamed |
|
24 | 24 | moving d/b to d-renamed/b (glob) |
|
25 | 25 | $ hg ci -m 'rename B' |
|
26 | 26 | |
|
27 | 27 | $ hg up -q -C 1 |
|
28 | 28 | |
|
29 | 29 | $ hg mv a a-renamed |
|
30 | 30 | $ echo x > d/x |
|
31 | 31 | $ hg add d/x |
|
32 | 32 | |
|
33 | 33 | $ hg ci -m 'rename A' |
|
34 | 34 | created new head |
|
35 | 35 | |
|
36 | 36 | $ hg tglog |
|
37 | @ 3: 'rename A' | |
|
37 | @ 3: 73a3ee40125d 'rename A' | |
|
38 | 38 | | |
|
39 | | o 2: 'rename B' | |
|
39 | | o 2: 220d0626d185 'rename B' | |
|
40 | 40 | |/ |
|
41 | o 1: 'B' | |
|
41 | o 1: 3ab5da9a5c01 'B' | |
|
42 | 42 | | |
|
43 | o 0: 'A' | |
|
43 | o 0: 1994f17a630e 'A' | |
|
44 | 44 | |
|
45 | 45 | |
|
46 | 46 | Rename is tracked: |
|
47 | 47 | |
|
48 | 48 | $ hg tlog -p --git -r tip |
|
49 | 3: 'rename A' | |
|
49 | 3: 73a3ee40125d 'rename A' | |
|
50 | 50 | diff --git a/a b/a-renamed |
|
51 | 51 | rename from a |
|
52 | 52 | rename to a-renamed |
|
53 | 53 | diff --git a/d/x b/d/x |
|
54 | 54 | new file mode 100644 |
|
55 | 55 | --- /dev/null |
|
56 | 56 | +++ b/d/x |
|
57 | 57 | @@ -0,0 +1,1 @@ |
|
58 | 58 | +x |
|
59 | 59 | |
|
60 | 60 | Rebase the revision containing the rename: |
|
61 | 61 | |
|
62 | 62 | $ hg rebase -s 3 -d 2 |
|
63 | 63 | rebasing 3:73a3ee40125d "rename A" (tip) |
|
64 | 64 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-1d78ebcf-rebase.hg (glob) |
|
65 | 65 | |
|
66 | 66 | $ hg tglog |
|
67 | @ 3: 'rename A' | |
|
67 | @ 3: 032a9b75e83b 'rename A' | |
|
68 | 68 | | |
|
69 | o 2: 'rename B' | |
|
69 | o 2: 220d0626d185 'rename B' | |
|
70 | 70 | | |
|
71 | o 1: 'B' | |
|
71 | o 1: 3ab5da9a5c01 'B' | |
|
72 | 72 | | |
|
73 | o 0: 'A' | |
|
73 | o 0: 1994f17a630e 'A' | |
|
74 | 74 | |
|
75 | 75 | |
|
76 | 76 | Rename is not lost: |
|
77 | 77 | |
|
78 | 78 | $ hg tlog -p --git -r tip |
|
79 | 3: 'rename A' | |
|
79 | 3: 032a9b75e83b 'rename A' | |
|
80 | 80 | diff --git a/a b/a-renamed |
|
81 | 81 | rename from a |
|
82 | 82 | rename to a-renamed |
|
83 | 83 | diff --git a/d-renamed/x b/d-renamed/x |
|
84 | 84 | new file mode 100644 |
|
85 | 85 | --- /dev/null |
|
86 | 86 | +++ b/d-renamed/x |
|
87 | 87 | @@ -0,0 +1,1 @@ |
|
88 | 88 | +x |
|
89 | 89 | |
|
90 | 90 | |
|
91 | 91 | Rebased revision does not contain information about b (issue3739) |
|
92 | 92 | |
|
93 | 93 | $ hg log -r 3 --debug |
|
94 | 94 | changeset: 3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569 |
|
95 | 95 | tag: tip |
|
96 | 96 | phase: draft |
|
97 | 97 | parent: 2:220d0626d185f372d9d8f69d9c73b0811d7725f7 |
|
98 | 98 | parent: -1:0000000000000000000000000000000000000000 |
|
99 | 99 | manifest: 3:035d66b27a1b06b2d12b46d41a39adb7a200c370 |
|
100 | 100 | user: test |
|
101 | 101 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
102 | 102 | files+: a-renamed d-renamed/x |
|
103 | 103 | files-: a |
|
104 | 104 | extra: branch=default |
|
105 | 105 | extra: rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a |
|
106 | 106 | description: |
|
107 | 107 | rename A |
|
108 | 108 | |
|
109 | 109 | |
|
110 | 110 | |
|
111 | 111 | $ cd .. |
|
112 | 112 | |
|
113 | 113 | |
|
114 | 114 | $ hg init b |
|
115 | 115 | $ cd b |
|
116 | 116 | |
|
117 | 117 | $ echo a > a |
|
118 | 118 | $ hg ci -Am A |
|
119 | 119 | adding a |
|
120 | 120 | |
|
121 | 121 | $ echo b > b |
|
122 | 122 | $ hg ci -Am B |
|
123 | 123 | adding b |
|
124 | 124 | |
|
125 | 125 | $ hg cp b b-copied |
|
126 | 126 | $ hg ci -Am 'copy B' |
|
127 | 127 | |
|
128 | 128 | $ hg up -q -C 1 |
|
129 | 129 | |
|
130 | 130 | $ hg cp a a-copied |
|
131 | 131 | $ hg ci -m 'copy A' |
|
132 | 132 | created new head |
|
133 | 133 | |
|
134 | 134 | $ hg tglog |
|
135 | @ 3: 'copy A' | |
|
135 | @ 3: 0a8162ff18a8 'copy A' | |
|
136 | 136 | | |
|
137 | | o 2: 'copy B' | |
|
137 | | o 2: 39e588434882 'copy B' | |
|
138 | 138 | |/ |
|
139 | o 1: 'B' | |
|
139 | o 1: 6c81ed0049f8 'B' | |
|
140 | 140 | | |
|
141 | o 0: 'A' | |
|
141 | o 0: 1994f17a630e 'A' | |
|
142 | 142 | |
|
143 | 143 | Copy is tracked: |
|
144 | 144 | |
|
145 | 145 | $ hg tlog -p --git -r tip |
|
146 | 3: 'copy A' | |
|
146 | 3: 0a8162ff18a8 'copy A' | |
|
147 | 147 | diff --git a/a b/a-copied |
|
148 | 148 | copy from a |
|
149 | 149 | copy to a-copied |
|
150 | 150 | |
|
151 | 151 | Rebase the revision containing the copy: |
|
152 | 152 | |
|
153 | 153 | $ hg rebase -s 3 -d 2 |
|
154 | 154 | rebasing 3:0a8162ff18a8 "copy A" (tip) |
|
155 | 155 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-dd06302a-rebase.hg (glob) |
|
156 | 156 | |
|
157 | 157 | $ hg tglog |
|
158 | @ 3: 'copy A' | |
|
158 | @ 3: 98f6e6dbf45a 'copy A' | |
|
159 | 159 | | |
|
160 | o 2: 'copy B' | |
|
160 | o 2: 39e588434882 'copy B' | |
|
161 | 161 | | |
|
162 | o 1: 'B' | |
|
162 | o 1: 6c81ed0049f8 'B' | |
|
163 | 163 | | |
|
164 | o 0: 'A' | |
|
164 | o 0: 1994f17a630e 'A' | |
|
165 | 165 | |
|
166 | 166 | |
|
167 | 167 | Copy is not lost: |
|
168 | 168 | |
|
169 | 169 | $ hg tlog -p --git -r tip |
|
170 | 3: 'copy A' | |
|
170 | 3: 98f6e6dbf45a 'copy A' | |
|
171 | 171 | diff --git a/a b/a-copied |
|
172 | 172 | copy from a |
|
173 | 173 | copy to a-copied |
|
174 | 174 | |
|
175 | 175 | |
|
176 | 176 | Rebased revision does not contain information about b (issue3739) |
|
177 | 177 | |
|
178 | 178 | $ hg log -r 3 --debug |
|
179 | 179 | changeset: 3:98f6e6dbf45ab54079c2237fbd11066a5c41a11d |
|
180 | 180 | tag: tip |
|
181 | 181 | phase: draft |
|
182 | 182 | parent: 2:39e588434882ff77d01229d169cdc77f29e8855e |
|
183 | 183 | parent: -1:0000000000000000000000000000000000000000 |
|
184 | 184 | manifest: 3:2232f329d66fffe3930d43479ae624f66322b04d |
|
185 | 185 | user: test |
|
186 | 186 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
187 | 187 | files+: a-copied |
|
188 | 188 | extra: branch=default |
|
189 | 189 | extra: rebase_source=0a8162ff18a8900df8df8ef7ac0046955205613e |
|
190 | 190 | description: |
|
191 | 191 | copy A |
|
192 | 192 | |
|
193 | 193 | |
|
194 | 194 | |
|
195 | 195 | $ cd .. |
|
196 | 196 | |
|
197 | 197 | |
|
198 | 198 | Test rebase across repeating renames: |
|
199 | 199 | |
|
200 | 200 | $ hg init repo |
|
201 | 201 | |
|
202 | 202 | $ cd repo |
|
203 | 203 | |
|
204 | 204 | $ echo testing > file1.txt |
|
205 | 205 | $ hg add file1.txt |
|
206 | 206 | $ hg ci -m "Adding file1" |
|
207 | 207 | |
|
208 | 208 | $ hg rename file1.txt file2.txt |
|
209 | 209 | $ hg ci -m "Rename file1 to file2" |
|
210 | 210 | |
|
211 | 211 | $ echo Unrelated change > unrelated.txt |
|
212 | 212 | $ hg add unrelated.txt |
|
213 | 213 | $ hg ci -m "Unrelated change" |
|
214 | 214 | |
|
215 | 215 | $ hg rename file2.txt file1.txt |
|
216 | 216 | $ hg ci -m "Rename file2 back to file1" |
|
217 | 217 | |
|
218 | 218 | $ hg update -r -2 |
|
219 | 219 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
220 | 220 | |
|
221 | 221 | $ echo Another unrelated change >> unrelated.txt |
|
222 | 222 | $ hg ci -m "Another unrelated change" |
|
223 | 223 | created new head |
|
224 | 224 | |
|
225 | 225 | $ hg tglog |
|
226 | @ 4: 'Another unrelated change' | |
|
226 | @ 4: b918d683b091 'Another unrelated change' | |
|
227 | 227 | | |
|
228 | | o 3: 'Rename file2 back to file1' | |
|
228 | | o 3: 1ac17e43d8aa 'Rename file2 back to file1' | |
|
229 | 229 | |/ |
|
230 | o 2: 'Unrelated change' | |
|
230 | o 2: 480101d66d8d 'Unrelated change' | |
|
231 | 231 | | |
|
232 | o 1: 'Rename file1 to file2' | |
|
232 | o 1: be44c61debd2 'Rename file1 to file2' | |
|
233 | 233 | | |
|
234 | o 0: 'Adding file1' | |
|
234 | o 0: 8ce9a346991d 'Adding file1' | |
|
235 | 235 | |
|
236 | 236 | |
|
237 | 237 | $ hg rebase -s 4 -d 3 |
|
238 | 238 | rebasing 4:b918d683b091 "Another unrelated change" (tip) |
|
239 | 239 | saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-3024bc57-rebase.hg (glob) |
|
240 | 240 | |
|
241 | 241 | $ hg diff --stat -c . |
|
242 | 242 | unrelated.txt | 1 + |
|
243 | 243 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
244 | 244 | |
|
245 | 245 | $ cd .. |
|
246 | 246 | |
|
247 | 247 | Verify that copies get preserved (issue4192). |
|
248 | 248 | $ hg init copy-gets-preserved |
|
249 | 249 | $ cd copy-gets-preserved |
|
250 | 250 | |
|
251 | 251 | $ echo a > a |
|
252 | 252 | $ hg add a |
|
253 | 253 | $ hg commit --message "File a created" |
|
254 | 254 | $ hg copy a b |
|
255 | 255 | $ echo b > b |
|
256 | 256 | $ hg commit --message "File b created as copy of a and modified" |
|
257 | 257 | $ hg copy b c |
|
258 | 258 | $ echo c > c |
|
259 | 259 | $ hg commit --message "File c created as copy of b and modified" |
|
260 | 260 | $ hg copy c d |
|
261 | 261 | $ echo d > d |
|
262 | 262 | $ hg commit --message "File d created as copy of c and modified" |
|
263 | 263 | |
|
264 | 264 | Note that there are four entries in the log for d |
|
265 | 265 | $ hg tglog --follow d |
|
266 | @ 3: 'File d created as copy of c and modified' | |
|
266 | @ 3: 421b7e82bb85 'File d created as copy of c and modified' | |
|
267 | 267 | | |
|
268 | o 2: 'File c created as copy of b and modified' | |
|
268 | o 2: 327f772bc074 'File c created as copy of b and modified' | |
|
269 | 269 | | |
|
270 | o 1: 'File b created as copy of a and modified' | |
|
270 | o 1: 79d255d24ad2 'File b created as copy of a and modified' | |
|
271 | 271 | | |
|
272 | o 0: 'File a created' | |
|
272 | o 0: b220cd6d2326 'File a created' | |
|
273 | 273 | |
|
274 | 274 | Update back to before we performed copies, and inject an unrelated change. |
|
275 | 275 | $ hg update 0 |
|
276 | 276 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
277 | 277 | |
|
278 | 278 | $ echo unrelated > unrelated |
|
279 | 279 | $ hg add unrelated |
|
280 | 280 | $ hg commit --message "Unrelated file created" |
|
281 | 281 | created new head |
|
282 | 282 | $ hg update 4 |
|
283 | 283 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
284 | 284 | |
|
285 | 285 | Rebase the copies on top of the unrelated change. |
|
286 | 286 | $ hg rebase --source 1 --dest 4 |
|
287 | 287 | rebasing 1:79d255d24ad2 "File b created as copy of a and modified" |
|
288 | 288 | rebasing 2:327f772bc074 "File c created as copy of b and modified" |
|
289 | 289 | rebasing 3:421b7e82bb85 "File d created as copy of c and modified" |
|
290 | 290 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg (glob) |
|
291 | 291 | $ hg update 4 |
|
292 | 292 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
293 | 293 | |
|
294 | 294 | There should still be four entries in the log for d |
|
295 | 295 | $ hg tglog --follow d |
|
296 | @ 4: 'File d created as copy of c and modified' | |
|
296 | @ 4: dbb9ba033561 'File d created as copy of c and modified' | |
|
297 | 297 | | |
|
298 | o 3: 'File c created as copy of b and modified' | |
|
298 | o 3: af74b229bc02 'File c created as copy of b and modified' | |
|
299 | 299 | | |
|
300 | o 2: 'File b created as copy of a and modified' | |
|
300 | o 2: 68bf06433839 'File b created as copy of a and modified' | |
|
301 | 301 | : |
|
302 | o 0: 'File a created' | |
|
302 | o 0: b220cd6d2326 'File a created' | |
|
303 | 303 | |
|
304 | 304 | Same steps as above, but with --collapse on rebase to make sure the |
|
305 | 305 | copy records collapse correctly. |
|
306 | 306 | $ hg co 1 |
|
307 | 307 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
308 | 308 | $ echo more >> unrelated |
|
309 | 309 | $ hg ci -m 'unrelated commit is unrelated' |
|
310 | 310 | created new head |
|
311 | 311 | $ hg rebase -s 2 --dest 5 --collapse |
|
312 | 312 | rebasing 2:68bf06433839 "File b created as copy of a and modified" |
|
313 | 313 | rebasing 3:af74b229bc02 "File c created as copy of b and modified" |
|
314 | 314 | merging b and c to c |
|
315 | 315 | rebasing 4:dbb9ba033561 "File d created as copy of c and modified" |
|
316 | 316 | merging c and d to d |
|
317 | 317 | saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg (glob) |
|
318 | 318 | $ hg co tip |
|
319 | 319 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
320 | 320 | |
|
321 | 321 | This should show both revision 3 and 0 since 'd' was transitively a |
|
322 | 322 | copy of 'a'. |
|
323 | 323 | |
|
324 | 324 | $ hg tglog --follow d |
|
325 | @ 3: 'Collapsed revision | |
|
325 | @ 3: 5a46b94210e5 'Collapsed revision | |
|
326 | 326 | : * File b created as copy of a and modified |
|
327 | 327 | : * File c created as copy of b and modified |
|
328 | 328 | : * File d created as copy of c and modified' |
|
329 | o 0: 'File a created' | |
|
329 | o 0: b220cd6d2326 'File a created' | |
|
330 | 330 | |
|
331 | 331 | |
|
332 | 332 | $ cd .. |
@@ -1,984 +1,984 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > rebase= |
|
4 | 4 | > drawdag=$TESTDIR/drawdag.py |
|
5 | 5 | > |
|
6 | 6 | > [phases] |
|
7 | 7 | > publish=False |
|
8 | 8 | > |
|
9 | 9 | > [alias] |
|
10 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
|
10 | > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n" | |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | $ hg unbundle "$TESTDIR/bundles/rebase.hg" |
|
17 | 17 | adding changesets |
|
18 | 18 | adding manifests |
|
19 | 19 | adding file changes |
|
20 | 20 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
21 | 21 | new changesets cd010b8cd998:02de42196ebe |
|
22 | 22 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
23 | 23 | $ hg up tip |
|
24 | 24 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 25 | $ cd .. |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | Rebasing |
|
29 | 29 | D onto H - simple rebase: |
|
30 | 30 | (this also tests that editor is invoked if '--edit' is specified, and that we |
|
31 | 31 | can abort or warn for colliding untracked files) |
|
32 | 32 | |
|
33 | 33 | $ hg clone -q -u . a a1 |
|
34 | 34 | $ cd a1 |
|
35 | 35 | |
|
36 | 36 | $ hg tglog |
|
37 | @ 7: 'H' | |
|
37 | @ 7: 02de42196ebe 'H' | |
|
38 | 38 | | |
|
39 | | o 6: 'G' | |
|
39 | | o 6: eea13746799a 'G' | |
|
40 | 40 | |/| |
|
41 | o | 5: 'F' | |
|
41 | o | 5: 24b6387c8c8c 'F' | |
|
42 | 42 | | | |
|
43 | | o 4: 'E' | |
|
43 | | o 4: 9520eea781bc 'E' | |
|
44 | 44 | |/ |
|
45 | | o 3: 'D' | |
|
45 | | o 3: 32af7686d403 'D' | |
|
46 | 46 | | | |
|
47 | | o 2: 'C' | |
|
47 | | o 2: 5fddd98957c8 'C' | |
|
48 | 48 | | | |
|
49 | | o 1: 'B' | |
|
49 | | o 1: 42ccdea3bb16 'B' | |
|
50 | 50 | |/ |
|
51 | o 0: 'A' | |
|
51 | o 0: cd010b8cd998 'A' | |
|
52 | 52 | |
|
53 | 53 | |
|
54 | 54 | $ hg status --rev "3^1" --rev 3 |
|
55 | 55 | A D |
|
56 | 56 | $ echo collide > D |
|
57 | 57 | $ HGEDITOR=cat hg rebase -s 3 -d 7 --edit --config merge.checkunknown=warn |
|
58 | 58 | rebasing 3:32af7686d403 "D" |
|
59 | 59 | D: replacing untracked file |
|
60 | 60 | D |
|
61 | 61 | |
|
62 | 62 | |
|
63 | 63 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
64 | 64 | HG: Leave message empty to abort commit. |
|
65 | 65 | HG: -- |
|
66 | 66 | HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com> |
|
67 | 67 | HG: branch 'default' |
|
68 | 68 | HG: added D |
|
69 | 69 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) |
|
70 | 70 | $ cat D.orig |
|
71 | 71 | collide |
|
72 | 72 | $ rm D.orig |
|
73 | 73 | |
|
74 | 74 | $ hg tglog |
|
75 | o 7: 'D' | |
|
75 | o 7: 1619f02ff7dd 'D' | |
|
76 | 76 | | |
|
77 | @ 6: 'H' | |
|
77 | @ 6: 02de42196ebe 'H' | |
|
78 | 78 | | |
|
79 | | o 5: 'G' | |
|
79 | | o 5: eea13746799a 'G' | |
|
80 | 80 | |/| |
|
81 | o | 4: 'F' | |
|
81 | o | 4: 24b6387c8c8c 'F' | |
|
82 | 82 | | | |
|
83 | | o 3: 'E' | |
|
83 | | o 3: 9520eea781bc 'E' | |
|
84 | 84 | |/ |
|
85 | | o 2: 'C' | |
|
85 | | o 2: 5fddd98957c8 'C' | |
|
86 | 86 | | | |
|
87 | | o 1: 'B' | |
|
87 | | o 1: 42ccdea3bb16 'B' | |
|
88 | 88 | |/ |
|
89 | o 0: 'A' | |
|
89 | o 0: cd010b8cd998 'A' | |
|
90 | 90 | |
|
91 | 91 | $ cd .. |
|
92 | 92 | |
|
93 | 93 | |
|
94 | 94 | D onto F - intermediate point: |
|
95 | 95 | (this also tests that editor is not invoked if '--edit' is not specified, and |
|
96 | 96 | that we can ignore for colliding untracked files) |
|
97 | 97 | |
|
98 | 98 | $ hg clone -q -u . a a2 |
|
99 | 99 | $ cd a2 |
|
100 | 100 | $ echo collide > D |
|
101 | 101 | |
|
102 | 102 | $ HGEDITOR=cat hg rebase -s 3 -d 5 --config merge.checkunknown=ignore |
|
103 | 103 | rebasing 3:32af7686d403 "D" |
|
104 | 104 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/32af7686d403-6f7dface-rebase.hg (glob) |
|
105 | 105 | $ cat D.orig |
|
106 | 106 | collide |
|
107 | 107 | $ rm D.orig |
|
108 | 108 | |
|
109 | 109 | $ hg tglog |
|
110 | o 7: 'D' | |
|
110 | o 7: 2107530e74ab 'D' | |
|
111 | 111 | | |
|
112 | | @ 6: 'H' | |
|
112 | | @ 6: 02de42196ebe 'H' | |
|
113 | 113 | |/ |
|
114 | | o 5: 'G' | |
|
114 | | o 5: eea13746799a 'G' | |
|
115 | 115 | |/| |
|
116 | o | 4: 'F' | |
|
116 | o | 4: 24b6387c8c8c 'F' | |
|
117 | 117 | | | |
|
118 | | o 3: 'E' | |
|
118 | | o 3: 9520eea781bc 'E' | |
|
119 | 119 | |/ |
|
120 | | o 2: 'C' | |
|
120 | | o 2: 5fddd98957c8 'C' | |
|
121 | 121 | | | |
|
122 | | o 1: 'B' | |
|
122 | | o 1: 42ccdea3bb16 'B' | |
|
123 | 123 | |/ |
|
124 | o 0: 'A' | |
|
124 | o 0: cd010b8cd998 'A' | |
|
125 | 125 | |
|
126 | 126 | $ cd .. |
|
127 | 127 | |
|
128 | 128 | |
|
129 | 129 | E onto H - skip of G: |
|
130 | 130 | (this also tests that we can overwrite untracked files and don't create backups |
|
131 | 131 | if they have the same contents) |
|
132 | 132 | |
|
133 | 133 | $ hg clone -q -u . a a3 |
|
134 | 134 | $ cd a3 |
|
135 | 135 | $ hg cat -r 4 E | tee E |
|
136 | 136 | E |
|
137 | 137 | |
|
138 | 138 | $ hg rebase -s 4 -d 7 |
|
139 | 139 | rebasing 4:9520eea781bc "E" |
|
140 | 140 | rebasing 6:eea13746799a "G" |
|
141 | 141 | note: rebase of 6:eea13746799a created no changes to commit |
|
142 | 142 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg (glob) |
|
143 | 143 | $ f E.orig |
|
144 | 144 | E.orig: file not found |
|
145 | 145 | |
|
146 | 146 | $ hg tglog |
|
147 | o 6: 'E' | |
|
147 | o 6: 9f8b8ec77260 'E' | |
|
148 | 148 | | |
|
149 | @ 5: 'H' | |
|
149 | @ 5: 02de42196ebe 'H' | |
|
150 | 150 | | |
|
151 | o 4: 'F' | |
|
151 | o 4: 24b6387c8c8c 'F' | |
|
152 | 152 | | |
|
153 | | o 3: 'D' | |
|
153 | | o 3: 32af7686d403 'D' | |
|
154 | 154 | | | |
|
155 | | o 2: 'C' | |
|
155 | | o 2: 5fddd98957c8 'C' | |
|
156 | 156 | | | |
|
157 | | o 1: 'B' | |
|
157 | | o 1: 42ccdea3bb16 'B' | |
|
158 | 158 | |/ |
|
159 | o 0: 'A' | |
|
159 | o 0: cd010b8cd998 'A' | |
|
160 | 160 | |
|
161 | 161 | $ cd .. |
|
162 | 162 | |
|
163 | 163 | |
|
164 | 164 | F onto E - rebase of a branching point (skip G): |
|
165 | 165 | |
|
166 | 166 | $ hg clone -q -u . a a4 |
|
167 | 167 | $ cd a4 |
|
168 | 168 | |
|
169 | 169 | $ hg rebase -s 5 -d 4 |
|
170 | 170 | rebasing 5:24b6387c8c8c "F" |
|
171 | 171 | rebasing 6:eea13746799a "G" |
|
172 | 172 | note: rebase of 6:eea13746799a created no changes to commit |
|
173 | 173 | rebasing 7:02de42196ebe "H" (tip) |
|
174 | 174 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) |
|
175 | 175 | |
|
176 | 176 | $ hg tglog |
|
177 | @ 6: 'H' | |
|
177 | @ 6: e9240aeaa6ad 'H' | |
|
178 | 178 | | |
|
179 | o 5: 'F' | |
|
179 | o 5: 5d0ccadb6e3e 'F' | |
|
180 | 180 | | |
|
181 | o 4: 'E' | |
|
181 | o 4: 9520eea781bc 'E' | |
|
182 | 182 | | |
|
183 | | o 3: 'D' | |
|
183 | | o 3: 32af7686d403 'D' | |
|
184 | 184 | | | |
|
185 | | o 2: 'C' | |
|
185 | | o 2: 5fddd98957c8 'C' | |
|
186 | 186 | | | |
|
187 | | o 1: 'B' | |
|
187 | | o 1: 42ccdea3bb16 'B' | |
|
188 | 188 | |/ |
|
189 | o 0: 'A' | |
|
189 | o 0: cd010b8cd998 'A' | |
|
190 | 190 | |
|
191 | 191 | $ cd .. |
|
192 | 192 | |
|
193 | 193 | |
|
194 | 194 | G onto H - merged revision having a parent in ancestors of target: |
|
195 | 195 | |
|
196 | 196 | $ hg clone -q -u . a a5 |
|
197 | 197 | $ cd a5 |
|
198 | 198 | |
|
199 | 199 | $ hg rebase -s 6 -d 7 |
|
200 | 200 | rebasing 6:eea13746799a "G" |
|
201 | 201 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/eea13746799a-883828ed-rebase.hg (glob) |
|
202 | 202 | |
|
203 | 203 | $ hg tglog |
|
204 | o 7: 'G' | |
|
204 | o 7: 397834907a90 'G' | |
|
205 | 205 | |\ |
|
206 | | @ 6: 'H' | |
|
206 | | @ 6: 02de42196ebe 'H' | |
|
207 | 207 | | | |
|
208 | | o 5: 'F' | |
|
208 | | o 5: 24b6387c8c8c 'F' | |
|
209 | 209 | | | |
|
210 | o | 4: 'E' | |
|
210 | o | 4: 9520eea781bc 'E' | |
|
211 | 211 | |/ |
|
212 | | o 3: 'D' | |
|
212 | | o 3: 32af7686d403 'D' | |
|
213 | 213 | | | |
|
214 | | o 2: 'C' | |
|
214 | | o 2: 5fddd98957c8 'C' | |
|
215 | 215 | | | |
|
216 | | o 1: 'B' | |
|
216 | | o 1: 42ccdea3bb16 'B' | |
|
217 | 217 | |/ |
|
218 | o 0: 'A' | |
|
218 | o 0: cd010b8cd998 'A' | |
|
219 | 219 | |
|
220 | 220 | $ cd .. |
|
221 | 221 | |
|
222 | 222 | |
|
223 | 223 | F onto B - G maintains E as parent: |
|
224 | 224 | |
|
225 | 225 | $ hg clone -q -u . a a6 |
|
226 | 226 | $ cd a6 |
|
227 | 227 | |
|
228 | 228 | $ hg rebase -s 5 -d 1 |
|
229 | 229 | rebasing 5:24b6387c8c8c "F" |
|
230 | 230 | rebasing 6:eea13746799a "G" |
|
231 | 231 | rebasing 7:02de42196ebe "H" (tip) |
|
232 | 232 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/24b6387c8c8c-c3fe765d-rebase.hg (glob) |
|
233 | 233 | |
|
234 | 234 | $ hg tglog |
|
235 | @ 7: 'H' | |
|
235 | @ 7: c87be72f9641 'H' | |
|
236 | 236 | | |
|
237 | | o 6: 'G' | |
|
237 | | o 6: 17badd73d4f1 'G' | |
|
238 | 238 | |/| |
|
239 | o | 5: 'F' | |
|
239 | o | 5: 74fb9ed646c4 'F' | |
|
240 | 240 | | | |
|
241 | | o 4: 'E' | |
|
241 | | o 4: 9520eea781bc 'E' | |
|
242 | 242 | | | |
|
243 | | | o 3: 'D' | |
|
243 | | | o 3: 32af7686d403 'D' | |
|
244 | 244 | | | | |
|
245 | +---o 2: 'C' | |
|
245 | +---o 2: 5fddd98957c8 'C' | |
|
246 | 246 | | | |
|
247 | o | 1: 'B' | |
|
247 | o | 1: 42ccdea3bb16 'B' | |
|
248 | 248 | |/ |
|
249 | o 0: 'A' | |
|
249 | o 0: cd010b8cd998 'A' | |
|
250 | 250 | |
|
251 | 251 | $ cd .. |
|
252 | 252 | |
|
253 | 253 | |
|
254 | 254 | These will fail (using --source): |
|
255 | 255 | |
|
256 | 256 | G onto F - rebase onto an ancestor: |
|
257 | 257 | |
|
258 | 258 | $ hg clone -q -u . a a7 |
|
259 | 259 | $ cd a7 |
|
260 | 260 | |
|
261 | 261 | $ hg rebase -s 6 -d 5 |
|
262 | 262 | nothing to rebase |
|
263 | 263 | [1] |
|
264 | 264 | |
|
265 | 265 | F onto G - rebase onto a descendant: |
|
266 | 266 | |
|
267 | 267 | $ hg rebase -s 5 -d 6 |
|
268 | 268 | abort: source and destination form a cycle |
|
269 | 269 | [255] |
|
270 | 270 | |
|
271 | 271 | G onto B - merge revision with both parents not in ancestors of target: |
|
272 | 272 | |
|
273 | 273 | $ hg rebase -s 6 -d 1 |
|
274 | 274 | rebasing 6:eea13746799a "G" |
|
275 | 275 | abort: cannot rebase 6:eea13746799a without moving at least one of its parents |
|
276 | 276 | [255] |
|
277 | 277 | $ hg rebase --abort |
|
278 | 278 | rebase aborted |
|
279 | 279 | |
|
280 | 280 | These will abort gracefully (using --base): |
|
281 | 281 | |
|
282 | 282 | G onto G - rebase onto same changeset: |
|
283 | 283 | |
|
284 | 284 | $ hg rebase -b 6 -d 6 |
|
285 | 285 | nothing to rebase - eea13746799a is both "base" and destination |
|
286 | 286 | [1] |
|
287 | 287 | |
|
288 | 288 | G onto F - rebase onto an ancestor: |
|
289 | 289 | |
|
290 | 290 | $ hg rebase -b 6 -d 5 |
|
291 | 291 | nothing to rebase |
|
292 | 292 | [1] |
|
293 | 293 | |
|
294 | 294 | F onto G - rebase onto a descendant: |
|
295 | 295 | |
|
296 | 296 | $ hg rebase -b 5 -d 6 |
|
297 | 297 | nothing to rebase - "base" 24b6387c8c8c is already an ancestor of destination eea13746799a |
|
298 | 298 | [1] |
|
299 | 299 | |
|
300 | 300 | C onto A - rebase onto an ancestor: |
|
301 | 301 | |
|
302 | 302 | $ hg rebase -d 0 -s 2 |
|
303 | 303 | rebasing 2:5fddd98957c8 "C" |
|
304 | 304 | rebasing 3:32af7686d403 "D" |
|
305 | 305 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-f9244fa1-rebase.hg (glob) |
|
306 | 306 | $ hg tglog |
|
307 | o 7: 'D' | |
|
307 | o 7: c9659aac0000 'D' | |
|
308 | 308 | | |
|
309 | o 6: 'C' | |
|
309 | o 6: e1c4361dd923 'C' | |
|
310 | 310 | | |
|
311 | | @ 5: 'H' | |
|
311 | | @ 5: 02de42196ebe 'H' | |
|
312 | 312 | | | |
|
313 | | | o 4: 'G' | |
|
313 | | | o 4: eea13746799a 'G' | |
|
314 | 314 | | |/| |
|
315 | | o | 3: 'F' | |
|
315 | | o | 3: 24b6387c8c8c 'F' | |
|
316 | 316 | |/ / |
|
317 | | o 2: 'E' | |
|
317 | | o 2: 9520eea781bc 'E' | |
|
318 | 318 | |/ |
|
319 | | o 1: 'B' | |
|
319 | | o 1: 42ccdea3bb16 'B' | |
|
320 | 320 | |/ |
|
321 | o 0: 'A' | |
|
321 | o 0: cd010b8cd998 'A' | |
|
322 | 322 | |
|
323 | 323 | |
|
324 | 324 | Check rebasing public changeset |
|
325 | 325 | |
|
326 | 326 | $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6 |
|
327 | 327 | $ hg rebase -d 0 -b 6 |
|
328 | 328 | nothing to rebase |
|
329 | 329 | [1] |
|
330 | 330 | $ hg rebase -d 5 -b 6 |
|
331 | 331 | abort: can't rebase public changeset e1c4361dd923 |
|
332 | 332 | (see 'hg help phases' for details) |
|
333 | 333 | [255] |
|
334 | 334 | $ hg rebase -d 5 -r '1 + (6::)' |
|
335 | 335 | abort: can't rebase public changeset e1c4361dd923 |
|
336 | 336 | (see 'hg help phases' for details) |
|
337 | 337 | [255] |
|
338 | 338 | |
|
339 | 339 | $ hg rebase -d 5 -b 6 --keep |
|
340 | 340 | rebasing 6:e1c4361dd923 "C" |
|
341 | 341 | rebasing 7:c9659aac0000 "D" (tip) |
|
342 | 342 | |
|
343 | 343 | Check rebasing mutable changeset |
|
344 | 344 | Source phase greater or equal to destination phase: new changeset get the phase of source: |
|
345 | 345 | $ hg id -n |
|
346 | 346 | 5 |
|
347 | 347 | $ hg rebase -s9 -d0 |
|
348 | 348 | rebasing 9:2b23e52411f4 "D" (tip) |
|
349 | 349 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-f942decf-rebase.hg (glob) |
|
350 | 350 | $ hg id -n # check we updated back to parent |
|
351 | 351 | 5 |
|
352 | 352 | $ hg log --template "{phase}\n" -r 9 |
|
353 | 353 | draft |
|
354 | 354 | $ hg rebase -s9 -d1 |
|
355 | 355 | rebasing 9:2cb10d0cfc6c "D" (tip) |
|
356 | 356 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-ddb0f256-rebase.hg (glob) |
|
357 | 357 | $ hg log --template "{phase}\n" -r 9 |
|
358 | 358 | draft |
|
359 | 359 | $ hg phase --force --secret 9 |
|
360 | 360 | $ hg rebase -s9 -d0 |
|
361 | 361 | rebasing 9:c5b12b67163a "D" (tip) |
|
362 | 362 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-4e372053-rebase.hg (glob) |
|
363 | 363 | $ hg log --template "{phase}\n" -r 9 |
|
364 | 364 | secret |
|
365 | 365 | $ hg rebase -s9 -d1 |
|
366 | 366 | rebasing 9:2a0524f868ac "D" (tip) |
|
367 | 367 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-cefd8574-rebase.hg (glob) |
|
368 | 368 | $ hg log --template "{phase}\n" -r 9 |
|
369 | 369 | secret |
|
370 | 370 | Source phase lower than destination phase: new changeset get the phase of destination: |
|
371 | 371 | $ hg rebase -s8 -d9 |
|
372 | 372 | rebasing 8:6d4f22462821 "C" |
|
373 | 373 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-3441f70b-rebase.hg (glob) |
|
374 | 374 | $ hg log --template "{phase}\n" -r 'rev(9)' |
|
375 | 375 | secret |
|
376 | 376 | |
|
377 | 377 | $ cd .. |
|
378 | 378 | |
|
379 | 379 | Check that temporary bundle doesn't lose phase when not using generaldelta |
|
380 | 380 | |
|
381 | 381 | $ hg --config format.usegeneraldelta=no init issue5678 |
|
382 | 382 | $ cd issue5678 |
|
383 | 383 | $ grep generaldelta .hg/requires |
|
384 | 384 | [1] |
|
385 | 385 | $ echo a > a |
|
386 | 386 | $ hg ci -Aqm a |
|
387 | 387 | $ echo b > b |
|
388 | 388 | $ hg ci -Aqm b |
|
389 | 389 | $ hg co -q '.^' |
|
390 | 390 | $ echo c > c |
|
391 | 391 | $ hg ci -Aqm c |
|
392 | 392 | $ hg phase --public |
|
393 | 393 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' |
|
394 | 394 | @ 2:d36c public c |
|
395 | 395 | | |
|
396 | 396 | | o 1:d2ae draft b |
|
397 | 397 | |/ |
|
398 | 398 | o 0:cb9a public a |
|
399 | 399 | |
|
400 | 400 | $ hg rebase -s 1 -d 2 |
|
401 | 401 | rebasing 1:d2ae7f538514 "b" |
|
402 | 402 | saved backup bundle to $TESTTMP/issue5678/.hg/strip-backup/d2ae7f538514-2953539b-rebase.hg (glob) |
|
403 | 403 | $ hg log -G -T '{rev}:{node|shortest} {phase} {desc}\n' |
|
404 | 404 | o 2:c882 draft b |
|
405 | 405 | | |
|
406 | 406 | @ 1:d36c public c |
|
407 | 407 | | |
|
408 | 408 | o 0:cb9a public a |
|
409 | 409 | |
|
410 | 410 | $ cd .. |
|
411 | 411 | |
|
412 | 412 | Test for revset |
|
413 | 413 | |
|
414 | 414 | We need a bit different graph |
|
415 | 415 | All destination are B |
|
416 | 416 | |
|
417 | 417 | $ hg init ah |
|
418 | 418 | $ cd ah |
|
419 | 419 | $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg" |
|
420 | 420 | adding changesets |
|
421 | 421 | adding manifests |
|
422 | 422 | adding file changes |
|
423 | 423 | added 9 changesets with 9 changes to 9 files (+2 heads) |
|
424 | 424 | new changesets 9ae2ed22e576:479ddb54a924 |
|
425 | 425 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
426 | 426 | $ hg tglog |
|
427 | o 8: 'I' | |
|
427 | o 8: 479ddb54a924 'I' | |
|
428 | 428 | | |
|
429 | o 7: 'H' | |
|
429 | o 7: 72434a4e60b0 'H' | |
|
430 | 430 | | |
|
431 | o 6: 'G' | |
|
431 | o 6: 3d8a618087a7 'G' | |
|
432 | 432 | | |
|
433 | | o 5: 'F' | |
|
433 | | o 5: 41bfcc75ed73 'F' | |
|
434 | 434 | | | |
|
435 | | o 4: 'E' | |
|
435 | | o 4: c01897464e7f 'E' | |
|
436 | 436 | |/ |
|
437 | o 3: 'D' | |
|
437 | o 3: ffd453c31098 'D' | |
|
438 | 438 | | |
|
439 | o 2: 'C' | |
|
439 | o 2: c9e50f6cdc55 'C' | |
|
440 | 440 | | |
|
441 | | o 1: 'B' | |
|
441 | | o 1: 8fd0f7e49f53 'B' | |
|
442 | 442 | |/ |
|
443 | o 0: 'A' | |
|
443 | o 0: 9ae2ed22e576 'A' | |
|
444 | 444 | |
|
445 | 445 | $ cd .. |
|
446 | 446 | |
|
447 | 447 | |
|
448 | 448 | Simple case with keep: |
|
449 | 449 | |
|
450 | 450 | Source on have two descendant heads but ask for one |
|
451 | 451 | |
|
452 | 452 | $ hg clone -q -u . ah ah1 |
|
453 | 453 | $ cd ah1 |
|
454 | 454 | $ hg rebase -r '2::8' -d 1 |
|
455 | 455 | abort: can't remove original changesets with unrebased descendants |
|
456 | 456 | (use --keep to keep original changesets) |
|
457 | 457 | [255] |
|
458 | 458 | $ hg rebase -r '2::8' -d 1 -k |
|
459 | 459 | rebasing 2:c9e50f6cdc55 "C" |
|
460 | 460 | rebasing 3:ffd453c31098 "D" |
|
461 | 461 | rebasing 6:3d8a618087a7 "G" |
|
462 | 462 | rebasing 7:72434a4e60b0 "H" |
|
463 | 463 | rebasing 8:479ddb54a924 "I" (tip) |
|
464 | 464 | $ hg tglog |
|
465 | o 13: 'I' | |
|
465 | o 13: 9bf1d9358a90 'I' | |
|
466 | 466 | | |
|
467 | o 12: 'H' | |
|
467 | o 12: 274623a778d4 'H' | |
|
468 | 468 | | |
|
469 | o 11: 'G' | |
|
469 | o 11: ab8c8617c8e8 'G' | |
|
470 | 470 | | |
|
471 | o 10: 'D' | |
|
471 | o 10: c8cbf59f70da 'D' | |
|
472 | 472 | | |
|
473 | o 9: 'C' | |
|
473 | o 9: 563e4faab485 'C' | |
|
474 | 474 | | |
|
475 | | o 8: 'I' | |
|
475 | | o 8: 479ddb54a924 'I' | |
|
476 | 476 | | | |
|
477 | | o 7: 'H' | |
|
477 | | o 7: 72434a4e60b0 'H' | |
|
478 | 478 | | | |
|
479 | | o 6: 'G' | |
|
479 | | o 6: 3d8a618087a7 'G' | |
|
480 | 480 | | | |
|
481 | | | o 5: 'F' | |
|
481 | | | o 5: 41bfcc75ed73 'F' | |
|
482 | 482 | | | | |
|
483 | | | o 4: 'E' | |
|
483 | | | o 4: c01897464e7f 'E' | |
|
484 | 484 | | |/ |
|
485 | | o 3: 'D' | |
|
485 | | o 3: ffd453c31098 'D' | |
|
486 | 486 | | | |
|
487 | | o 2: 'C' | |
|
487 | | o 2: c9e50f6cdc55 'C' | |
|
488 | 488 | | | |
|
489 | o | 1: 'B' | |
|
489 | o | 1: 8fd0f7e49f53 'B' | |
|
490 | 490 | |/ |
|
491 | o 0: 'A' | |
|
491 | o 0: 9ae2ed22e576 'A' | |
|
492 | 492 | |
|
493 | 493 | |
|
494 | 494 | $ cd .. |
|
495 | 495 | |
|
496 | 496 | Base on have one descendant heads we ask for but common ancestor have two |
|
497 | 497 | |
|
498 | 498 | $ hg clone -q -u . ah ah2 |
|
499 | 499 | $ cd ah2 |
|
500 | 500 | $ hg rebase -r '3::8' -d 1 |
|
501 | 501 | abort: can't remove original changesets with unrebased descendants |
|
502 | 502 | (use --keep to keep original changesets) |
|
503 | 503 | [255] |
|
504 | 504 | $ hg rebase -r '3::8' -d 1 --keep |
|
505 | 505 | rebasing 3:ffd453c31098 "D" |
|
506 | 506 | rebasing 6:3d8a618087a7 "G" |
|
507 | 507 | rebasing 7:72434a4e60b0 "H" |
|
508 | 508 | rebasing 8:479ddb54a924 "I" (tip) |
|
509 | 509 | $ hg tglog |
|
510 | o 12: 'I' | |
|
510 | o 12: 9d7da0053b1c 'I' | |
|
511 | 511 | | |
|
512 | o 11: 'H' | |
|
512 | o 11: 8fbd00952cbc 'H' | |
|
513 | 513 | | |
|
514 | o 10: 'G' | |
|
514 | o 10: 51d434a615ee 'G' | |
|
515 | 515 | | |
|
516 | o 9: 'D' | |
|
516 | o 9: a9c125634b0b 'D' | |
|
517 | 517 | | |
|
518 | | o 8: 'I' | |
|
518 | | o 8: 479ddb54a924 'I' | |
|
519 | 519 | | | |
|
520 | | o 7: 'H' | |
|
520 | | o 7: 72434a4e60b0 'H' | |
|
521 | 521 | | | |
|
522 | | o 6: 'G' | |
|
522 | | o 6: 3d8a618087a7 'G' | |
|
523 | 523 | | | |
|
524 | | | o 5: 'F' | |
|
524 | | | o 5: 41bfcc75ed73 'F' | |
|
525 | 525 | | | | |
|
526 | | | o 4: 'E' | |
|
526 | | | o 4: c01897464e7f 'E' | |
|
527 | 527 | | |/ |
|
528 | | o 3: 'D' | |
|
528 | | o 3: ffd453c31098 'D' | |
|
529 | 529 | | | |
|
530 | | o 2: 'C' | |
|
530 | | o 2: c9e50f6cdc55 'C' | |
|
531 | 531 | | | |
|
532 | o | 1: 'B' | |
|
532 | o | 1: 8fd0f7e49f53 'B' | |
|
533 | 533 | |/ |
|
534 | o 0: 'A' | |
|
534 | o 0: 9ae2ed22e576 'A' | |
|
535 | 535 | |
|
536 | 536 | |
|
537 | 537 | $ cd .. |
|
538 | 538 | |
|
539 | 539 | rebase subset |
|
540 | 540 | |
|
541 | 541 | $ hg clone -q -u . ah ah3 |
|
542 | 542 | $ cd ah3 |
|
543 | 543 | $ hg rebase -r '3::7' -d 1 |
|
544 | 544 | abort: can't remove original changesets with unrebased descendants |
|
545 | 545 | (use --keep to keep original changesets) |
|
546 | 546 | [255] |
|
547 | 547 | $ hg rebase -r '3::7' -d 1 --keep |
|
548 | 548 | rebasing 3:ffd453c31098 "D" |
|
549 | 549 | rebasing 6:3d8a618087a7 "G" |
|
550 | 550 | rebasing 7:72434a4e60b0 "H" |
|
551 | 551 | $ hg tglog |
|
552 | o 11: 'H' | |
|
552 | o 11: 8fbd00952cbc 'H' | |
|
553 | 553 | | |
|
554 | o 10: 'G' | |
|
554 | o 10: 51d434a615ee 'G' | |
|
555 | 555 | | |
|
556 | o 9: 'D' | |
|
556 | o 9: a9c125634b0b 'D' | |
|
557 | 557 | | |
|
558 | | o 8: 'I' | |
|
558 | | o 8: 479ddb54a924 'I' | |
|
559 | 559 | | | |
|
560 | | o 7: 'H' | |
|
560 | | o 7: 72434a4e60b0 'H' | |
|
561 | 561 | | | |
|
562 | | o 6: 'G' | |
|
562 | | o 6: 3d8a618087a7 'G' | |
|
563 | 563 | | | |
|
564 | | | o 5: 'F' | |
|
564 | | | o 5: 41bfcc75ed73 'F' | |
|
565 | 565 | | | | |
|
566 | | | o 4: 'E' | |
|
566 | | | o 4: c01897464e7f 'E' | |
|
567 | 567 | | |/ |
|
568 | | o 3: 'D' | |
|
568 | | o 3: ffd453c31098 'D' | |
|
569 | 569 | | | |
|
570 | | o 2: 'C' | |
|
570 | | o 2: c9e50f6cdc55 'C' | |
|
571 | 571 | | | |
|
572 | o | 1: 'B' | |
|
572 | o | 1: 8fd0f7e49f53 'B' | |
|
573 | 573 | |/ |
|
574 | o 0: 'A' | |
|
574 | o 0: 9ae2ed22e576 'A' | |
|
575 | 575 | |
|
576 | 576 | |
|
577 | 577 | $ cd .. |
|
578 | 578 | |
|
579 | 579 | rebase subset with multiple head |
|
580 | 580 | |
|
581 | 581 | $ hg clone -q -u . ah ah4 |
|
582 | 582 | $ cd ah4 |
|
583 | 583 | $ hg rebase -r '3::(7+5)' -d 1 |
|
584 | 584 | abort: can't remove original changesets with unrebased descendants |
|
585 | 585 | (use --keep to keep original changesets) |
|
586 | 586 | [255] |
|
587 | 587 | $ hg rebase -r '3::(7+5)' -d 1 --keep |
|
588 | 588 | rebasing 3:ffd453c31098 "D" |
|
589 | 589 | rebasing 4:c01897464e7f "E" |
|
590 | 590 | rebasing 5:41bfcc75ed73 "F" |
|
591 | 591 | rebasing 6:3d8a618087a7 "G" |
|
592 | 592 | rebasing 7:72434a4e60b0 "H" |
|
593 | 593 | $ hg tglog |
|
594 | o 13: 'H' | |
|
594 | o 13: 8fbd00952cbc 'H' | |
|
595 | 595 | | |
|
596 | o 12: 'G' | |
|
596 | o 12: 51d434a615ee 'G' | |
|
597 | 597 | | |
|
598 | | o 11: 'F' | |
|
598 | | o 11: df23d8bda0b7 'F' | |
|
599 | 599 | | | |
|
600 | | o 10: 'E' | |
|
600 | | o 10: 47b7889448ff 'E' | |
|
601 | 601 | |/ |
|
602 | o 9: 'D' | |
|
602 | o 9: a9c125634b0b 'D' | |
|
603 | 603 | | |
|
604 | | o 8: 'I' | |
|
604 | | o 8: 479ddb54a924 'I' | |
|
605 | 605 | | | |
|
606 | | o 7: 'H' | |
|
606 | | o 7: 72434a4e60b0 'H' | |
|
607 | 607 | | | |
|
608 | | o 6: 'G' | |
|
608 | | o 6: 3d8a618087a7 'G' | |
|
609 | 609 | | | |
|
610 | | | o 5: 'F' | |
|
610 | | | o 5: 41bfcc75ed73 'F' | |
|
611 | 611 | | | | |
|
612 | | | o 4: 'E' | |
|
612 | | | o 4: c01897464e7f 'E' | |
|
613 | 613 | | |/ |
|
614 | | o 3: 'D' | |
|
614 | | o 3: ffd453c31098 'D' | |
|
615 | 615 | | | |
|
616 | | o 2: 'C' | |
|
616 | | o 2: c9e50f6cdc55 'C' | |
|
617 | 617 | | | |
|
618 | o | 1: 'B' | |
|
618 | o | 1: 8fd0f7e49f53 'B' | |
|
619 | 619 | |/ |
|
620 | o 0: 'A' | |
|
620 | o 0: 9ae2ed22e576 'A' | |
|
621 | 621 | |
|
622 | 622 | |
|
623 | 623 | $ cd .. |
|
624 | 624 | |
|
625 | 625 | More advanced tests |
|
626 | 626 | |
|
627 | 627 | rebase on ancestor with revset |
|
628 | 628 | |
|
629 | 629 | $ hg clone -q -u . ah ah5 |
|
630 | 630 | $ cd ah5 |
|
631 | 631 | $ hg rebase -r '6::' -d 2 |
|
632 | 632 | rebasing 6:3d8a618087a7 "G" |
|
633 | 633 | rebasing 7:72434a4e60b0 "H" |
|
634 | 634 | rebasing 8:479ddb54a924 "I" (tip) |
|
635 | 635 | saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-b4f73f31-rebase.hg (glob) |
|
636 | 636 | $ hg tglog |
|
637 | o 8: 'I' | |
|
637 | o 8: fcb52e68a694 'I' | |
|
638 | 638 | | |
|
639 | o 7: 'H' | |
|
639 | o 7: 77bd65cd7600 'H' | |
|
640 | 640 | | |
|
641 | o 6: 'G' | |
|
641 | o 6: 12d0e738fb18 'G' | |
|
642 | 642 | | |
|
643 | | o 5: 'F' | |
|
643 | | o 5: 41bfcc75ed73 'F' | |
|
644 | 644 | | | |
|
645 | | o 4: 'E' | |
|
645 | | o 4: c01897464e7f 'E' | |
|
646 | 646 | | | |
|
647 | | o 3: 'D' | |
|
647 | | o 3: ffd453c31098 'D' | |
|
648 | 648 | |/ |
|
649 | o 2: 'C' | |
|
649 | o 2: c9e50f6cdc55 'C' | |
|
650 | 650 | | |
|
651 | | o 1: 'B' | |
|
651 | | o 1: 8fd0f7e49f53 'B' | |
|
652 | 652 | |/ |
|
653 | o 0: 'A' | |
|
653 | o 0: 9ae2ed22e576 'A' | |
|
654 | 654 | |
|
655 | 655 | $ cd .. |
|
656 | 656 | |
|
657 | 657 | |
|
658 | 658 | rebase with multiple root. |
|
659 | 659 | We rebase E and G on B |
|
660 | 660 | We would expect heads are I, F if it was supported |
|
661 | 661 | |
|
662 | 662 | $ hg clone -q -u . ah ah6 |
|
663 | 663 | $ cd ah6 |
|
664 | 664 | $ hg rebase -r '(4+6)::' -d 1 |
|
665 | 665 | rebasing 4:c01897464e7f "E" |
|
666 | 666 | rebasing 5:41bfcc75ed73 "F" |
|
667 | 667 | rebasing 6:3d8a618087a7 "G" |
|
668 | 668 | rebasing 7:72434a4e60b0 "H" |
|
669 | 669 | rebasing 8:479ddb54a924 "I" (tip) |
|
670 | 670 | saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-aae93a24-rebase.hg (glob) |
|
671 | 671 | $ hg tglog |
|
672 | o 8: 'I' | |
|
672 | o 8: 9136df9a87cf 'I' | |
|
673 | 673 | | |
|
674 | o 7: 'H' | |
|
674 | o 7: 23e8f30da832 'H' | |
|
675 | 675 | | |
|
676 | o 6: 'G' | |
|
676 | o 6: b0efe8534e8b 'G' | |
|
677 | 677 | | |
|
678 | | o 5: 'F' | |
|
678 | | o 5: 6eb5b496ab79 'F' | |
|
679 | 679 | | | |
|
680 | | o 4: 'E' | |
|
680 | | o 4: d15eade9b0b1 'E' | |
|
681 | 681 | |/ |
|
682 | | o 3: 'D' | |
|
682 | | o 3: ffd453c31098 'D' | |
|
683 | 683 | | | |
|
684 | | o 2: 'C' | |
|
684 | | o 2: c9e50f6cdc55 'C' | |
|
685 | 685 | | | |
|
686 | o | 1: 'B' | |
|
686 | o | 1: 8fd0f7e49f53 'B' | |
|
687 | 687 | |/ |
|
688 | o 0: 'A' | |
|
688 | o 0: 9ae2ed22e576 'A' | |
|
689 | 689 | |
|
690 | 690 | $ cd .. |
|
691 | 691 | |
|
692 | 692 | More complex rebase with multiple roots |
|
693 | 693 | each root have a different common ancestor with the destination and this is a detach |
|
694 | 694 | |
|
695 | 695 | (setup) |
|
696 | 696 | |
|
697 | 697 | $ hg clone -q -u . a a8 |
|
698 | 698 | $ cd a8 |
|
699 | 699 | $ echo I > I |
|
700 | 700 | $ hg add I |
|
701 | 701 | $ hg commit -m I |
|
702 | 702 | $ hg up 4 |
|
703 | 703 | 1 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
704 | 704 | $ echo I > J |
|
705 | 705 | $ hg add J |
|
706 | 706 | $ hg commit -m J |
|
707 | 707 | created new head |
|
708 | 708 | $ echo I > K |
|
709 | 709 | $ hg add K |
|
710 | 710 | $ hg commit -m K |
|
711 | 711 | $ hg tglog |
|
712 | @ 10: 'K' | |
|
712 | @ 10: 23a4ace37988 'K' | |
|
713 | 713 | | |
|
714 | o 9: 'J' | |
|
714 | o 9: 1301922eeb0c 'J' | |
|
715 | 715 | | |
|
716 | | o 8: 'I' | |
|
716 | | o 8: e7ec4e813ba6 'I' | |
|
717 | 717 | | | |
|
718 | | o 7: 'H' | |
|
718 | | o 7: 02de42196ebe 'H' | |
|
719 | 719 | | | |
|
720 | +---o 6: 'G' | |
|
720 | +---o 6: eea13746799a 'G' | |
|
721 | 721 | | |/ |
|
722 | | o 5: 'F' | |
|
722 | | o 5: 24b6387c8c8c 'F' | |
|
723 | 723 | | | |
|
724 | o | 4: 'E' | |
|
724 | o | 4: 9520eea781bc 'E' | |
|
725 | 725 | |/ |
|
726 | | o 3: 'D' | |
|
726 | | o 3: 32af7686d403 'D' | |
|
727 | 727 | | | |
|
728 | | o 2: 'C' | |
|
728 | | o 2: 5fddd98957c8 'C' | |
|
729 | 729 | | | |
|
730 | | o 1: 'B' | |
|
730 | | o 1: 42ccdea3bb16 'B' | |
|
731 | 731 | |/ |
|
732 | o 0: 'A' | |
|
732 | o 0: cd010b8cd998 'A' | |
|
733 | 733 | |
|
734 | 734 | (actual test) |
|
735 | 735 | |
|
736 | 736 | $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)' |
|
737 | 737 | rebasing 8:e7ec4e813ba6 "I" |
|
738 | 738 | rebasing 10:23a4ace37988 "K" (tip) |
|
739 | 739 | saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-b06984b3-rebase.hg (glob) |
|
740 | 740 | $ hg log --rev 'children(desc(G))' |
|
741 | 741 | changeset: 9:adb617877056 |
|
742 | 742 | parent: 6:eea13746799a |
|
743 | 743 | user: test |
|
744 | 744 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
745 | 745 | summary: I |
|
746 | 746 | |
|
747 | 747 | changeset: 10:882431a34a0e |
|
748 | 748 | tag: tip |
|
749 | 749 | parent: 6:eea13746799a |
|
750 | 750 | user: test |
|
751 | 751 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
752 | 752 | summary: K |
|
753 | 753 | |
|
754 | 754 | $ hg tglog |
|
755 | @ 10: 'K' | |
|
755 | @ 10: 882431a34a0e 'K' | |
|
756 | 756 | | |
|
757 | | o 9: 'I' | |
|
757 | | o 9: adb617877056 'I' | |
|
758 | 758 | |/ |
|
759 | | o 8: 'J' | |
|
759 | | o 8: 1301922eeb0c 'J' | |
|
760 | 760 | | | |
|
761 | | | o 7: 'H' | |
|
761 | | | o 7: 02de42196ebe 'H' | |
|
762 | 762 | | | | |
|
763 | o---+ 6: 'G' | |
|
763 | o---+ 6: eea13746799a 'G' | |
|
764 | 764 | |/ / |
|
765 | | o 5: 'F' | |
|
765 | | o 5: 24b6387c8c8c 'F' | |
|
766 | 766 | | | |
|
767 | o | 4: 'E' | |
|
767 | o | 4: 9520eea781bc 'E' | |
|
768 | 768 | |/ |
|
769 | | o 3: 'D' | |
|
769 | | o 3: 32af7686d403 'D' | |
|
770 | 770 | | | |
|
771 | | o 2: 'C' | |
|
771 | | o 2: 5fddd98957c8 'C' | |
|
772 | 772 | | | |
|
773 | | o 1: 'B' | |
|
773 | | o 1: 42ccdea3bb16 'B' | |
|
774 | 774 | |/ |
|
775 | o 0: 'A' | |
|
775 | o 0: cd010b8cd998 'A' | |
|
776 | 776 | |
|
777 | 777 | |
|
778 | 778 | Test that rebase is not confused by $CWD disappearing during rebase (issue4121) |
|
779 | 779 | |
|
780 | 780 | $ cd .. |
|
781 | 781 | $ hg init cwd-vanish |
|
782 | 782 | $ cd cwd-vanish |
|
783 | 783 | $ touch initial-file |
|
784 | 784 | $ hg add initial-file |
|
785 | 785 | $ hg commit -m 'initial commit' |
|
786 | 786 | $ touch dest-file |
|
787 | 787 | $ hg add dest-file |
|
788 | 788 | $ hg commit -m 'dest commit' |
|
789 | 789 | $ hg up 0 |
|
790 | 790 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
791 | 791 | $ touch other-file |
|
792 | 792 | $ hg add other-file |
|
793 | 793 | $ hg commit -m 'first source commit' |
|
794 | 794 | created new head |
|
795 | 795 | $ mkdir subdir |
|
796 | 796 | $ cd subdir |
|
797 | 797 | $ touch subfile |
|
798 | 798 | $ hg add subfile |
|
799 | 799 | $ hg commit -m 'second source with subdir' |
|
800 | 800 | |
|
801 | 801 | $ hg rebase -b . -d 1 --traceback |
|
802 | 802 | rebasing 2:779a07b1b7a0 "first source commit" |
|
803 | 803 | current directory was removed (rmcwd !) |
|
804 | 804 | (consider changing to repo root: $TESTTMP/cwd-vanish) (rmcwd !) |
|
805 | 805 | rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip) |
|
806 | 806 | saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-rebase.hg (glob) |
|
807 | 807 | |
|
808 | 808 | Get back to the root of cwd-vanish. Note that even though `cd ..` |
|
809 | 809 | works on most systems, it does not work on FreeBSD 10, so we use an |
|
810 | 810 | absolute path to get back to the repository. |
|
811 | 811 | $ cd $TESTTMP |
|
812 | 812 | |
|
813 | 813 | Test that rebase is done in topo order (issue5370) |
|
814 | 814 | |
|
815 | 815 | $ hg init order |
|
816 | 816 | $ cd order |
|
817 | 817 | $ touch a && hg add a && hg ci -m A |
|
818 | 818 | $ touch b && hg add b && hg ci -m B |
|
819 | 819 | $ touch c && hg add c && hg ci -m C |
|
820 | 820 | $ hg up 1 |
|
821 | 821 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
822 | 822 | $ touch d && hg add d && hg ci -m D |
|
823 | 823 | created new head |
|
824 | 824 | $ hg up 2 |
|
825 | 825 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
826 | 826 | $ touch e && hg add e && hg ci -m E |
|
827 | 827 | $ hg up 3 |
|
828 | 828 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
829 | 829 | $ touch f && hg add f && hg ci -m F |
|
830 | 830 | $ hg up 0 |
|
831 | 831 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
832 | 832 | $ touch g && hg add g && hg ci -m G |
|
833 | 833 | created new head |
|
834 | 834 | |
|
835 | 835 | $ hg tglog |
|
836 | @ 6: 'G' | |
|
836 | @ 6: 124bb27b6f28 'G' | |
|
837 | 837 | | |
|
838 | | o 5: 'F' | |
|
838 | | o 5: 412b391de760 'F' | |
|
839 | 839 | | | |
|
840 | | | o 4: 'E' | |
|
840 | | | o 4: 82ae8dc7a9b7 'E' | |
|
841 | 841 | | | | |
|
842 | | o | 3: 'D' | |
|
842 | | o | 3: ab709c9f7171 'D' | |
|
843 | 843 | | | | |
|
844 | | | o 2: 'C' | |
|
844 | | | o 2: d84f5cfaaf14 'C' | |
|
845 | 845 | | |/ |
|
846 | | o 1: 'B' | |
|
846 | | o 1: 76035bbd54bd 'B' | |
|
847 | 847 | |/ |
|
848 | o 0: 'A' | |
|
848 | o 0: 216878401574 'A' | |
|
849 | 849 | |
|
850 | 850 | |
|
851 | 851 | $ hg rebase -s 1 -d 6 |
|
852 | 852 | rebasing 1:76035bbd54bd "B" |
|
853 | 853 | rebasing 2:d84f5cfaaf14 "C" |
|
854 | 854 | rebasing 4:82ae8dc7a9b7 "E" |
|
855 | 855 | rebasing 3:ab709c9f7171 "D" |
|
856 | 856 | rebasing 5:412b391de760 "F" |
|
857 | 857 | saved backup bundle to $TESTTMP/order/.hg/strip-backup/76035bbd54bd-e341bc99-rebase.hg (glob) |
|
858 | 858 | |
|
859 | 859 | $ hg tglog |
|
860 | o 6: 'F' | |
|
860 | o 6: 31884cfb735e 'F' | |
|
861 | 861 | | |
|
862 | o 5: 'D' | |
|
862 | o 5: 6d89fa5b0909 'D' | |
|
863 | 863 | | |
|
864 | | o 4: 'E' | |
|
864 | | o 4: de64d97c697b 'E' | |
|
865 | 865 | | | |
|
866 | | o 3: 'C' | |
|
866 | | o 3: b18e4d2d0aa1 'C' | |
|
867 | 867 | |/ |
|
868 | o 2: 'B' | |
|
868 | o 2: 0983daf9ff6a 'B' | |
|
869 | 869 | | |
|
870 | @ 1: 'G' | |
|
870 | @ 1: 124bb27b6f28 'G' | |
|
871 | 871 | | |
|
872 | o 0: 'A' | |
|
872 | o 0: 216878401574 'A' | |
|
873 | 873 | |
|
874 | 874 | |
|
875 | 875 | Test experimental revset |
|
876 | 876 | ======================== |
|
877 | 877 | |
|
878 | 878 | $ cd ../cwd-vanish |
|
879 | 879 | |
|
880 | 880 | Make the repo a bit more interesting |
|
881 | 881 | |
|
882 | 882 | $ hg up 1 |
|
883 | 883 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
884 | 884 | $ echo aaa > aaa |
|
885 | 885 | $ hg add aaa |
|
886 | 886 | $ hg commit -m aaa |
|
887 | 887 | created new head |
|
888 | 888 | $ hg log -G |
|
889 | 889 | @ changeset: 4:5f7bc9025ed2 |
|
890 | 890 | | tag: tip |
|
891 | 891 | | parent: 1:58d79cc1cf43 |
|
892 | 892 | | user: test |
|
893 | 893 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
894 | 894 | | summary: aaa |
|
895 | 895 | | |
|
896 | 896 | | o changeset: 3:1910d5ff34ea |
|
897 | 897 | | | user: test |
|
898 | 898 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
899 | 899 | | | summary: second source with subdir |
|
900 | 900 | | | |
|
901 | 901 | | o changeset: 2:82901330b6ef |
|
902 | 902 | |/ user: test |
|
903 | 903 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
904 | 904 | | summary: first source commit |
|
905 | 905 | | |
|
906 | 906 | o changeset: 1:58d79cc1cf43 |
|
907 | 907 | | user: test |
|
908 | 908 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
909 | 909 | | summary: dest commit |
|
910 | 910 | | |
|
911 | 911 | o changeset: 0:e94b687f7da3 |
|
912 | 912 | user: test |
|
913 | 913 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
914 | 914 | summary: initial commit |
|
915 | 915 | |
|
916 | 916 | |
|
917 | 917 | Testing from lower head |
|
918 | 918 | |
|
919 | 919 | $ hg up 3 |
|
920 | 920 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
921 | 921 | $ hg log -r '_destrebase()' |
|
922 | 922 | changeset: 4:5f7bc9025ed2 |
|
923 | 923 | tag: tip |
|
924 | 924 | parent: 1:58d79cc1cf43 |
|
925 | 925 | user: test |
|
926 | 926 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
927 | 927 | summary: aaa |
|
928 | 928 | |
|
929 | 929 | |
|
930 | 930 | Testing from upper head |
|
931 | 931 | |
|
932 | 932 | $ hg log -r '_destrebase(4)' |
|
933 | 933 | changeset: 3:1910d5ff34ea |
|
934 | 934 | user: test |
|
935 | 935 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
936 | 936 | summary: second source with subdir |
|
937 | 937 | |
|
938 | 938 | $ hg up 4 |
|
939 | 939 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
940 | 940 | $ hg log -r '_destrebase()' |
|
941 | 941 | changeset: 3:1910d5ff34ea |
|
942 | 942 | user: test |
|
943 | 943 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
944 | 944 | summary: second source with subdir |
|
945 | 945 | |
|
946 | 946 | Testing rebase being called inside another transaction |
|
947 | 947 | |
|
948 | 948 | $ cd $TESTTMP |
|
949 | 949 | $ hg init tr-state |
|
950 | 950 | $ cd tr-state |
|
951 | 951 | $ cat > $TESTTMP/wraprebase.py <<EOF |
|
952 | 952 | > from __future__ import absolute_import |
|
953 | 953 | > from mercurial import extensions |
|
954 | 954 | > def _rebase(orig, ui, repo, *args, **kwargs): |
|
955 | 955 | > with repo.wlock(): |
|
956 | 956 | > with repo.lock(): |
|
957 | 957 | > with repo.transaction('wrappedrebase'): |
|
958 | 958 | > return orig(ui, repo, *args, **kwargs) |
|
959 | 959 | > def wraprebase(loaded): |
|
960 | 960 | > assert loaded |
|
961 | 961 | > rebasemod = extensions.find('rebase') |
|
962 | 962 | > extensions.wrapcommand(rebasemod.cmdtable, 'rebase', _rebase) |
|
963 | 963 | > def extsetup(ui): |
|
964 | 964 | > extensions.afterloaded('rebase', wraprebase) |
|
965 | 965 | > EOF |
|
966 | 966 | |
|
967 | 967 | $ cat >> .hg/hgrc <<EOF |
|
968 | 968 | > [extensions] |
|
969 | 969 | > wraprebase=$TESTTMP/wraprebase.py |
|
970 | 970 | > [experimental] |
|
971 | 971 | > evolution=true |
|
972 | 972 | > EOF |
|
973 | 973 | |
|
974 | 974 | $ hg debugdrawdag <<'EOS' |
|
975 | 975 | > B C |
|
976 | 976 | > |/ |
|
977 | 977 | > A |
|
978 | 978 | > EOS |
|
979 | 979 | |
|
980 | 980 | $ hg rebase -s C -d B |
|
981 | 981 | rebasing 2:dc0947a82db8 "C" (C tip) |
|
982 | 982 | |
|
983 | 983 | $ [ -f .hg/rebasestate ] && echo 'WRONG: rebasestate should not exist' |
|
984 | 984 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now