Show More
@@ -1,662 +1,666 b'' | |||
|
1 | 1 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | 2 | $ echo "mq=" >> $HGRCPATH |
|
3 | 3 | $ echo "shelve=" >> $HGRCPATH |
|
4 | 4 | $ echo "[defaults]" >> $HGRCPATH |
|
5 | 5 | $ echo "diff = --nodates --git" >> $HGRCPATH |
|
6 | 6 | $ echo "qnew = --date '0 0'" >> $HGRCPATH |
|
7 | 7 | |
|
8 | 8 | $ hg init repo |
|
9 | 9 | $ cd repo |
|
10 | 10 | $ mkdir a b |
|
11 | 11 | $ echo a > a/a |
|
12 | 12 | $ echo b > b/b |
|
13 | 13 | $ echo c > c |
|
14 | 14 | $ echo d > d |
|
15 | 15 | $ echo x > x |
|
16 | 16 | $ hg addremove -q |
|
17 | 17 | |
|
18 | 18 | shelving in an empty repo should be possible |
|
19 | 19 | |
|
20 | 20 | $ hg shelve |
|
21 | 21 | shelved as default |
|
22 | 22 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
23 | 23 | |
|
24 | 24 | $ hg unshelve |
|
25 | 25 | unshelving change 'default' |
|
26 | 26 | |
|
27 | 27 | $ hg commit -q -m 'initial commit' |
|
28 | 28 | |
|
29 | 29 | $ hg shelve |
|
30 | 30 | nothing changed |
|
31 | 31 | [1] |
|
32 | 32 | |
|
33 | 33 | create an mq patch - shelving should work fine with a patch applied |
|
34 | 34 | |
|
35 | 35 | $ echo n > n |
|
36 | 36 | $ hg add n |
|
37 | 37 | $ hg commit n -m second |
|
38 | 38 | $ hg qnew second.patch |
|
39 | 39 | |
|
40 | 40 | shelve a change that we will delete later |
|
41 | 41 | |
|
42 | 42 | $ echo a >> a/a |
|
43 | 43 | $ hg shelve |
|
44 | 44 | shelved as default |
|
45 | 45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
46 | 46 | |
|
47 | 47 | set up some more complex changes to shelve |
|
48 | 48 | |
|
49 | 49 | $ echo a >> a/a |
|
50 | 50 | $ hg mv b b.rename |
|
51 | 51 | moving b/b to b.rename/b (glob) |
|
52 | 52 | $ hg cp c c.copy |
|
53 | 53 | $ hg status -C |
|
54 | 54 | M a/a |
|
55 | 55 | A b.rename/b |
|
56 | 56 | b/b |
|
57 | 57 | A c.copy |
|
58 | 58 | c |
|
59 | 59 | R b/b |
|
60 | 60 | |
|
61 | 61 | prevent some foot-shooting |
|
62 | 62 | |
|
63 | 63 | $ hg shelve -n foo/bar |
|
64 | 64 | abort: shelved change names may not contain slashes |
|
65 | 65 | [255] |
|
66 | 66 | $ hg shelve -n .baz |
|
67 | 67 | abort: shelved change names may not start with '.' |
|
68 | 68 | [255] |
|
69 | 69 | |
|
70 | 70 | the common case - no options or filenames |
|
71 | 71 | |
|
72 | 72 | $ hg shelve |
|
73 | 73 | shelved as default-01 |
|
74 | 74 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
75 | 75 | $ hg status -C |
|
76 | 76 | |
|
77 | 77 | ensure that our shelved changes exist |
|
78 | 78 | |
|
79 | 79 | $ hg shelve -l |
|
80 | 80 | default-01 (*) changes to '[mq]: second.patch' (glob) |
|
81 | 81 | default (*) changes to '[mq]: second.patch' (glob) |
|
82 | 82 | |
|
83 | 83 | $ hg shelve -l -p default |
|
84 | 84 | default (*) changes to '[mq]: second.patch' (glob) |
|
85 | 85 | |
|
86 | 86 | diff --git a/a/a b/a/a |
|
87 | 87 | --- a/a/a |
|
88 | 88 | +++ b/a/a |
|
89 | 89 | @@ -1,1 +1,2 @@ |
|
90 | 90 | a |
|
91 | 91 | +a |
|
92 | 92 | |
|
93 | 93 | delete our older shelved change |
|
94 | 94 | |
|
95 | 95 | $ hg shelve -d default |
|
96 | 96 | $ hg qfinish -a -q |
|
97 | 97 | |
|
98 | 98 | local edits should not prevent a shelved change from applying |
|
99 | 99 | |
|
100 | 100 | $ printf "z\na\n" > a/a |
|
101 | 101 | $ hg unshelve --keep |
|
102 | 102 | unshelving change 'default-01' |
|
103 | 103 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
104 | 104 | rebasing shelved changes |
|
105 | 105 | merging a/a |
|
106 | 106 | |
|
107 | 107 | $ hg revert --all -q |
|
108 | 108 | $ rm a/a.orig b.rename/b c.copy |
|
109 | 109 | |
|
110 | 110 | apply it and make sure our state is as expected |
|
111 | 111 | |
|
112 | 112 | $ hg unshelve |
|
113 | 113 | unshelving change 'default-01' |
|
114 | 114 | $ hg status -C |
|
115 | 115 | M a/a |
|
116 | 116 | A b.rename/b |
|
117 | 117 | b/b |
|
118 | 118 | A c.copy |
|
119 | 119 | c |
|
120 | 120 | R b/b |
|
121 | 121 | $ hg shelve -l |
|
122 | 122 | |
|
123 | 123 | $ hg unshelve |
|
124 | 124 | abort: no shelved changes to apply! |
|
125 | 125 | [255] |
|
126 | 126 | $ hg unshelve foo |
|
127 | 127 | abort: shelved change 'foo' not found |
|
128 | 128 | [255] |
|
129 | 129 | |
|
130 | 130 | named shelves, specific filenames, and "commit messages" should all work |
|
131 | 131 | |
|
132 | 132 | $ hg status -C |
|
133 | 133 | M a/a |
|
134 | 134 | A b.rename/b |
|
135 | 135 | b/b |
|
136 | 136 | A c.copy |
|
137 | 137 | c |
|
138 | 138 | R b/b |
|
139 | 139 | $ hg shelve -q -n wibble -m wat a |
|
140 | 140 | |
|
141 | 141 | expect "a" to no longer be present, but status otherwise unchanged |
|
142 | 142 | |
|
143 | 143 | $ hg status -C |
|
144 | 144 | A b.rename/b |
|
145 | 145 | b/b |
|
146 | 146 | A c.copy |
|
147 | 147 | c |
|
148 | 148 | R b/b |
|
149 | 149 | $ hg shelve -l --stat |
|
150 | 150 | wibble (*) wat (glob) |
|
151 | 151 | a/a | 1 + |
|
152 | 152 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
153 | 153 | |
|
154 | 154 | and now "a/a" should reappear |
|
155 | 155 | |
|
156 | 156 | $ cd a |
|
157 | 157 | $ hg unshelve -q wibble |
|
158 | 158 | $ cd .. |
|
159 | 159 | $ hg status -C |
|
160 | 160 | M a/a |
|
161 | 161 | A b.rename/b |
|
162 | 162 | b/b |
|
163 | 163 | A c.copy |
|
164 | 164 | c |
|
165 | 165 | R b/b |
|
166 | 166 | |
|
167 | 167 | cause unshelving to result in a merge with 'a' conflicting |
|
168 | 168 | |
|
169 | 169 | $ hg shelve -q |
|
170 | 170 | $ echo c>>a/a |
|
171 | 171 | $ hg commit -m second |
|
172 | 172 | $ hg tip --template '{files}\n' |
|
173 | 173 | a/a |
|
174 | 174 | |
|
175 | 175 | add an unrelated change that should be preserved |
|
176 | 176 | |
|
177 | 177 | $ mkdir foo |
|
178 | 178 | $ echo foo > foo/foo |
|
179 | 179 | $ hg add foo/foo |
|
180 | 180 | |
|
181 | 181 | force a conflicted merge to occur |
|
182 | 182 | |
|
183 | 183 | $ hg unshelve |
|
184 | 184 | unshelving change 'default' |
|
185 | 185 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
186 | 186 | rebasing shelved changes |
|
187 | 187 | merging a/a |
|
188 | 188 | warning: conflicts during merge. |
|
189 | 189 | merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
190 | 190 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
191 | 191 | [1] |
|
192 | 192 | |
|
193 | 193 | ensure that we have a merge with unresolved conflicts |
|
194 | 194 | |
|
195 | 195 | $ hg heads -q --template '{rev}\n' |
|
196 | 196 | 5 |
|
197 | 197 | 4 |
|
198 | 198 | $ hg parents -q --template '{rev}\n' |
|
199 | 199 | 4 |
|
200 | 200 | 5 |
|
201 | 201 | $ hg status |
|
202 | 202 | M a/a |
|
203 | 203 | M b.rename/b |
|
204 | 204 | M c.copy |
|
205 | 205 | R b/b |
|
206 | 206 | ? a/a.orig |
|
207 | 207 | $ hg diff |
|
208 | 208 | diff --git a/a/a b/a/a |
|
209 | 209 | --- a/a/a |
|
210 | 210 | +++ b/a/a |
|
211 | 211 | @@ -1,2 +1,6 @@ |
|
212 | 212 | a |
|
213 | 213 | +<<<<<<< local |
|
214 | 214 | c |
|
215 | 215 | +======= |
|
216 | 216 | +a |
|
217 | 217 | +>>>>>>> other |
|
218 | 218 | diff --git a/b.rename/b b/b.rename/b |
|
219 | 219 | new file mode 100644 |
|
220 | 220 | --- /dev/null |
|
221 | 221 | +++ b/b.rename/b |
|
222 | 222 | @@ -0,0 +1,1 @@ |
|
223 | 223 | +b |
|
224 | 224 | diff --git a/b/b b/b/b |
|
225 | 225 | deleted file mode 100644 |
|
226 | 226 | --- a/b/b |
|
227 | 227 | +++ /dev/null |
|
228 | 228 | @@ -1,1 +0,0 @@ |
|
229 | 229 | -b |
|
230 | 230 | diff --git a/c.copy b/c.copy |
|
231 | 231 | new file mode 100644 |
|
232 | 232 | --- /dev/null |
|
233 | 233 | +++ b/c.copy |
|
234 | 234 | @@ -0,0 +1,1 @@ |
|
235 | 235 | +c |
|
236 | 236 | $ hg resolve -l |
|
237 | 237 | U a/a |
|
238 | 238 | |
|
239 | 239 | $ hg shelve |
|
240 | 240 | abort: unshelve already in progress |
|
241 | 241 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
242 | 242 | [255] |
|
243 | 243 | |
|
244 | 244 | abort the unshelve and be happy |
|
245 | 245 | |
|
246 | 246 | $ hg status |
|
247 | 247 | M a/a |
|
248 | 248 | M b.rename/b |
|
249 | 249 | M c.copy |
|
250 | 250 | R b/b |
|
251 | 251 | ? a/a.orig |
|
252 | 252 | $ hg unshelve -a |
|
253 | 253 | rebase aborted |
|
254 | 254 | unshelve of 'default' aborted |
|
255 | 255 | $ hg heads -q |
|
256 | 256 | 3:2e69b451d1ea |
|
257 | 257 | $ hg parents |
|
258 | 258 | changeset: 3:2e69b451d1ea |
|
259 | 259 | tag: tip |
|
260 | 260 | user: test |
|
261 | 261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
262 | 262 | summary: second |
|
263 | 263 | |
|
264 | 264 | $ hg resolve -l |
|
265 | 265 | $ hg status |
|
266 | 266 | A foo/foo |
|
267 | 267 | ? a/a.orig |
|
268 | 268 | |
|
269 | 269 | try to continue with no unshelve underway |
|
270 | 270 | |
|
271 | 271 | $ hg unshelve -c |
|
272 | 272 | abort: no unshelve operation underway |
|
273 | 273 | [255] |
|
274 | 274 | $ hg status |
|
275 | 275 | A foo/foo |
|
276 | 276 | ? a/a.orig |
|
277 | 277 | |
|
278 | 278 | redo the unshelve to get a conflict |
|
279 | 279 | |
|
280 | 280 | $ hg unshelve -q |
|
281 | 281 | warning: conflicts during merge. |
|
282 | 282 | merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
283 | 283 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
284 | 284 | [1] |
|
285 | 285 | |
|
286 | 286 | attempt to continue |
|
287 | 287 | |
|
288 | 288 | $ hg unshelve -c |
|
289 | 289 | abort: unresolved conflicts, can't continue |
|
290 | 290 | (see 'hg resolve', then 'hg unshelve --continue') |
|
291 | 291 | [255] |
|
292 | 292 | |
|
293 | 293 | $ hg revert -r . a/a |
|
294 | 294 | $ hg resolve -m a/a |
|
295 | 295 | |
|
296 | 296 | $ hg commit -m 'commit while unshelve in progress' |
|
297 | 297 | abort: unshelve already in progress |
|
298 | 298 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
299 | 299 | [255] |
|
300 | 300 | |
|
301 | 301 | $ hg unshelve -c |
|
302 | 302 | unshelve of 'default' complete |
|
303 | 303 | |
|
304 | 304 | ensure the repo is as we hope |
|
305 | 305 | |
|
306 | 306 | $ hg parents |
|
307 | 307 | changeset: 3:2e69b451d1ea |
|
308 | 308 | tag: tip |
|
309 | 309 | user: test |
|
310 | 310 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
311 | 311 | summary: second |
|
312 | 312 | |
|
313 | 313 | $ hg heads -q |
|
314 | 314 | 3:2e69b451d1ea |
|
315 | 315 | |
|
316 | 316 | $ hg status -C |
|
317 | 317 | A b.rename/b |
|
318 | 318 | b/b |
|
319 | 319 | A c.copy |
|
320 | 320 | c |
|
321 | 321 | A foo/foo |
|
322 | 322 | R b/b |
|
323 | 323 | ? a/a.orig |
|
324 | 324 | |
|
325 | 325 | there should be no shelves left |
|
326 | 326 | |
|
327 | 327 | $ hg shelve -l |
|
328 | 328 | |
|
329 | 329 | #if execbit |
|
330 | 330 | |
|
331 | 331 | ensure that metadata-only changes are shelved |
|
332 | 332 | |
|
333 | 333 | $ chmod +x a/a |
|
334 | 334 | $ hg shelve -q -n execbit a/a |
|
335 | 335 | $ hg status a/a |
|
336 | 336 | $ hg unshelve -q execbit |
|
337 | 337 | $ hg status a/a |
|
338 | 338 | M a/a |
|
339 | 339 | $ hg revert a/a |
|
340 | 340 | |
|
341 | 341 | #endif |
|
342 | 342 | |
|
343 | 343 | #if symlink |
|
344 | 344 | |
|
345 | 345 | $ rm a/a |
|
346 | 346 | $ ln -s foo a/a |
|
347 | 347 | $ hg shelve -q -n symlink a/a |
|
348 | 348 | $ hg status a/a |
|
349 | 349 | $ hg unshelve -q symlink |
|
350 | 350 | $ hg status a/a |
|
351 | 351 | M a/a |
|
352 | 352 | $ hg revert a/a |
|
353 | 353 | |
|
354 | 354 | #endif |
|
355 | 355 | |
|
356 | 356 | set up another conflict between a commit and a shelved change |
|
357 | 357 | |
|
358 | 358 | $ hg revert -q -C -a |
|
359 | 359 | $ rm a/a.orig b.rename/b c.copy |
|
360 | 360 | $ echo a >> a/a |
|
361 | 361 | $ hg shelve -q |
|
362 | 362 | $ echo x >> a/a |
|
363 | 363 | $ hg ci -m 'create conflict' |
|
364 | 364 | $ hg add foo/foo |
|
365 | 365 | |
|
366 | 366 | if we resolve a conflict while unshelving, the unshelve should succeed |
|
367 | 367 | |
|
368 | 368 | $ HGMERGE=true hg unshelve |
|
369 | 369 | unshelving change 'default' |
|
370 | 370 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
371 | 371 | rebasing shelved changes |
|
372 | 372 | merging a/a |
|
373 | 373 | $ hg parents -q |
|
374 | 374 | 4:33f7f61e6c5e |
|
375 | 375 | $ hg shelve -l |
|
376 | 376 | $ hg status |
|
377 | 377 | A foo/foo |
|
378 | 378 | $ cat a/a |
|
379 | 379 | a |
|
380 | 380 | c |
|
381 | 381 | x |
|
382 | 382 | |
|
383 | 383 | test keep and cleanup |
|
384 | 384 | |
|
385 | 385 | $ hg shelve |
|
386 | 386 | shelved as default |
|
387 | 387 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
388 | 388 | $ hg shelve --list |
|
389 | 389 | default (*) changes to 'create conflict' (glob) |
|
390 | 390 | $ hg unshelve --keep |
|
391 | 391 | unshelving change 'default' |
|
392 | 392 | $ hg shelve --list |
|
393 | 393 | default (*) changes to 'create conflict' (glob) |
|
394 | 394 | $ hg shelve --cleanup |
|
395 | 395 | $ hg shelve --list |
|
396 | 396 | |
|
397 | 397 | test bookmarks |
|
398 | 398 | |
|
399 | 399 | $ hg bookmark test |
|
400 | 400 | $ hg bookmark |
|
401 | 401 | * test 4:33f7f61e6c5e |
|
402 | 402 | $ hg shelve |
|
403 | 403 | shelved as test |
|
404 | 404 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
405 | 405 | $ hg bookmark |
|
406 | 406 | * test 4:33f7f61e6c5e |
|
407 | 407 | $ hg unshelve |
|
408 | 408 | unshelving change 'test' |
|
409 | 409 | $ hg bookmark |
|
410 | 410 | * test 4:33f7f61e6c5e |
|
411 | 411 | |
|
412 | 412 | shelve should still work even if mq is disabled |
|
413 | 413 | |
|
414 | 414 | $ hg --config extensions.mq=! shelve |
|
415 | 415 | shelved as test |
|
416 | 416 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
417 | 417 | $ hg --config extensions.mq=! shelve --list |
|
418 | 418 | test (*) changes to 'create conflict' (glob) |
|
419 | 419 | $ hg --config extensions.mq=! unshelve |
|
420 | 420 | unshelving change 'test' |
|
421 | 421 | |
|
422 | 422 | shelve should leave dirstate clean (issue 4055) |
|
423 | 423 | |
|
424 | 424 | $ cd .. |
|
425 | 425 | $ hg init shelverebase |
|
426 | 426 | $ cd shelverebase |
|
427 | 427 | $ printf 'x\ny\n' > x |
|
428 | 428 | $ echo z > z |
|
429 | 429 | $ hg commit -Aqm xy |
|
430 | 430 | $ echo z >> x |
|
431 | 431 | $ hg commit -Aqm z |
|
432 | 432 | $ hg up 0 |
|
433 | 433 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
434 | 434 | $ printf 'a\nx\ny\nz\n' > x |
|
435 | 435 | $ hg commit -Aqm xyz |
|
436 | 436 | $ echo c >> z |
|
437 | 437 | $ hg shelve |
|
438 | 438 | shelved as default |
|
439 | 439 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 440 | $ hg rebase -d 1 --config extensions.rebase= |
|
441 | 441 | merging x |
|
442 | 442 | saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob) |
|
443 | 443 | $ hg unshelve |
|
444 | 444 | unshelving change 'default' |
|
445 | 445 | rebasing shelved changes |
|
446 | 446 | $ hg status |
|
447 | 447 | M z |
|
448 | 448 | |
|
449 | 449 | $ cd .. |
|
450 | 450 | |
|
451 | 451 | shelve should only unshelve pending changes (issue 4068) |
|
452 | 452 | |
|
453 | 453 | $ hg init onlypendingchanges |
|
454 | 454 | $ cd onlypendingchanges |
|
455 | 455 | $ touch a |
|
456 | 456 | $ hg ci -Aqm a |
|
457 | 457 | $ touch b |
|
458 | 458 | $ hg ci -Aqm b |
|
459 | 459 | $ hg up -q 0 |
|
460 | 460 | $ touch c |
|
461 | 461 | $ hg ci -Aqm c |
|
462 | 462 | |
|
463 | 463 | $ touch d |
|
464 | 464 | $ hg add d |
|
465 | 465 | $ hg shelve |
|
466 | 466 | shelved as default |
|
467 | 467 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
468 | 468 | $ hg up -q 1 |
|
469 | 469 | $ hg unshelve |
|
470 | 470 | unshelving change 'default' |
|
471 | 471 | rebasing shelved changes |
|
472 | 472 | $ hg status |
|
473 | 473 | A d |
|
474 | 474 | |
|
475 | 475 | unshelve should work on an ancestor of the original commit |
|
476 | 476 | |
|
477 | 477 | $ hg shelve |
|
478 | 478 | shelved as default |
|
479 | 479 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
480 | 480 | $ hg up 0 |
|
481 | 481 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
482 | 482 | $ hg unshelve |
|
483 | 483 | unshelving change 'default' |
|
484 | 484 | rebasing shelved changes |
|
485 | 485 | $ hg status |
|
486 | 486 | A d |
|
487 | 487 | |
|
488 | 488 | test bug 4073 we need to enable obsolete markers for it |
|
489 | 489 | |
|
490 | 490 | $ cat > ../obs.py << EOF |
|
491 | 491 | > import mercurial.obsolete |
|
492 | 492 | > mercurial.obsolete._enabled = True |
|
493 | 493 | > EOF |
|
494 | 494 | $ echo '[extensions]' >> $HGRCPATH |
|
495 | 495 | $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH |
|
496 | 496 | $ hg shelve |
|
497 | 497 | shelved as default |
|
498 | 498 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
499 | 499 | $ hg debugobsolete `hg --debug id -i -r 1` |
|
500 | 500 | $ hg unshelve |
|
501 | 501 | unshelving change 'default' |
|
502 | 502 | |
|
503 | 503 | unshelve should leave unknown files alone (issue4113) |
|
504 | 504 | |
|
505 | 505 | $ echo e > e |
|
506 | 506 | $ hg shelve |
|
507 | 507 | shelved as default |
|
508 | 508 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
509 | 509 | $ hg status |
|
510 | 510 | ? e |
|
511 | 511 | $ hg unshelve |
|
512 | 512 | unshelving change 'default' |
|
513 | 513 | $ hg status |
|
514 | 514 | A d |
|
515 | 515 | ? e |
|
516 | 516 | $ cat e |
|
517 | 517 | e |
|
518 | 518 | |
|
519 | 519 | unshelve should keep a copy of unknown files |
|
520 | 520 | |
|
521 | 521 | $ hg add e |
|
522 | 522 | $ hg shelve |
|
523 | 523 | shelved as default |
|
524 | 524 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
525 | 525 | $ echo z > e |
|
526 | 526 | $ hg unshelve |
|
527 | 527 | unshelving change 'default' |
|
528 | 528 | $ cat e |
|
529 | 529 | e |
|
530 | 530 | $ cat e.orig |
|
531 | 531 | z |
|
532 | 532 | |
|
533 | 533 | |
|
534 | unshelve and conflicts with untracked files | |
|
534 | unshelve and conflicts with tracked and untracked files | |
|
535 | 535 | |
|
536 | 536 | preparing: |
|
537 | 537 | |
|
538 | 538 | $ rm *.orig |
|
539 | 539 | $ hg ci -qm 'commit stuff' |
|
540 | 540 | $ hg phase -p null: |
|
541 | 541 | |
|
542 | 542 | no other changes - no merge: |
|
543 | 543 | |
|
544 | 544 | $ echo f > f |
|
545 | 545 | $ hg add f |
|
546 | 546 | $ hg shelve |
|
547 | 547 | shelved as default |
|
548 | 548 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
549 |
$ echo g |
|
|
549 | $ echo g > f | |
|
550 | 550 | $ hg unshelve |
|
551 | 551 | unshelving change 'default' |
|
552 | 552 | $ hg st |
|
553 | 553 | A f |
|
554 | 554 | ? f.orig |
|
555 | 555 | $ cat f |
|
556 | 556 | f |
|
557 | 557 | $ cat f.orig |
|
558 |
g |
|
|
558 | g | |
|
559 | 559 | |
|
560 | 560 | other uncommitted changes - merge: |
|
561 | 561 | |
|
562 | 562 | $ hg st |
|
563 | 563 | A f |
|
564 | 564 | ? f.orig |
|
565 | 565 | $ hg shelve |
|
566 | 566 | shelved as default |
|
567 | 567 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
568 | 568 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' |
|
569 | 569 | o 4 changes to 'commit stuff' shelve@localhost |
|
570 | 570 | | |
|
571 | 571 | $ hg log -G --template '{rev} {desc|firstline} {author}' |
|
572 | 572 | @ 3 commit stuff test |
|
573 | 573 | | |
|
574 | 574 | | o 2 c test |
|
575 | 575 | |/ |
|
576 | 576 | o 0 a test |
|
577 | 577 | |
|
578 | 578 | $ mv f.orig f |
|
579 |
$ echo |
|
|
579 | $ echo 1 > a | |
|
580 | 580 | $ hg unshelve --date '1073741824 0' |
|
581 | 581 | unshelving change 'default' |
|
582 | 582 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
583 | 583 | rebasing shelved changes |
|
584 | 584 | merging f |
|
585 | 585 | warning: conflicts during merge. |
|
586 | 586 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
587 | 587 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
588 | 588 | [1] |
|
589 | 589 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
|
590 | 590 | @ 5 changes to 'commit stuff' shelve@localhost 1970-01-01 00:00 +0000 |
|
591 | 591 | | |
|
592 | 592 | | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
|
593 | 593 | |/ |
|
594 | 594 | o 3 commit stuff test 1970-01-01 00:00 +0000 |
|
595 | 595 | | |
|
596 | 596 | | o 2 c test 1970-01-01 00:00 +0000 |
|
597 | 597 | |/ |
|
598 | 598 | o 0 a test 1970-01-01 00:00 +0000 |
|
599 | 599 | |
|
600 | 600 | $ hg st |
|
601 | 601 | M f |
|
602 | 602 | ? f.orig |
|
603 | 603 | $ cat f |
|
604 | 604 | <<<<<<< local |
|
605 |
g |
|
|
605 | g | |
|
606 | 606 | ======= |
|
607 | 607 | f |
|
608 | 608 | >>>>>>> other |
|
609 | 609 | $ cat f.orig |
|
610 |
g |
|
|
610 | g | |
|
611 | 611 | $ hg unshelve --abort |
|
612 | 612 | rebase aborted |
|
613 | 613 | unshelve of 'default' aborted |
|
614 | 614 | $ hg st |
|
615 | 615 | M a |
|
616 | 616 | ? f.orig |
|
617 | 617 | $ cat f.orig |
|
618 |
g |
|
|
618 | g | |
|
619 | 619 | $ hg unshelve |
|
620 | 620 | unshelving change 'default' |
|
621 | 621 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
622 | 622 | rebasing shelved changes |
|
623 | 623 | $ hg st |
|
624 | 624 | M a |
|
625 | 625 | A f |
|
626 | 626 | ? f.orig |
|
627 | 627 | |
|
628 | 628 | other committed changes - merge: |
|
629 | 629 | |
|
630 | 630 | $ hg shelve f |
|
631 | 631 | shelved as default |
|
632 | 632 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
633 | 633 | $ hg ci a -m 'intermediate other change' |
|
634 | 634 | $ mv f.orig f |
|
635 | 635 | $ hg unshelve |
|
636 | 636 | unshelving change 'default' |
|
637 | 637 | rebasing shelved changes |
|
638 | 638 | merging f |
|
639 | 639 | warning: conflicts during merge. |
|
640 | 640 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
641 | 641 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
642 | 642 | [1] |
|
643 | 643 | $ hg st |
|
644 | 644 | M f |
|
645 | 645 | ? f.orig |
|
646 | 646 | $ cat f |
|
647 | 647 | <<<<<<< local |
|
648 |
g |
|
|
648 | g | |
|
649 | 649 | ======= |
|
650 | 650 | f |
|
651 | 651 | >>>>>>> other |
|
652 | 652 | $ cat f.orig |
|
653 |
g |
|
|
653 | g | |
|
654 | 654 | $ hg unshelve --abort |
|
655 | 655 | rebase aborted |
|
656 | 656 | no changes needed to a |
|
657 | 657 | no changes needed to d |
|
658 | 658 | no changes needed to e |
|
659 | 659 | unshelve of 'default' aborted |
|
660 | $ hg st | |
|
661 | ? f.orig | |
|
662 | $ cat f.orig | |
|
663 | g | |
|
660 | 664 | $ hg shelve --delete default |
|
661 | 665 | |
|
662 | 666 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now