comparison tests/test-shelve.t @ 20413:0ac94c0a3a38

shelve: status messages from unshelve It was hard for the user to know what was going on when unshelving - especially if the user had to resolve conflicts and thus got to see the intermediate states. Seeing that pending changes was gone could scare the user, make him panic, and do stuff that really made him lose data. Merging (both when rebasing and with pending changes) also requires some understanding of where in the process you are and what you are merging. To help the user we now show a couple of status messages (when relevant): temporarily committing pending changes (restore with 'hg unshelve --abort') rebasing shelved changes
author Mads Kiilerich <madski@unity3d.com>
date Mon, 10 Feb 2014 00:54:27 +0100
parents e584fc30456b
children 022431336f72
comparison
equal deleted inserted replaced
20412:e584fc30456b 20413:0ac94c0a3a38
98 local edits should not prevent a shelved change from applying 98 local edits should not prevent a shelved change from applying
99 99
100 $ printf "z\na\n" > a/a 100 $ printf "z\na\n" > a/a
101 $ hg unshelve --keep 101 $ hg unshelve --keep
102 unshelving change 'default-01' 102 unshelving change 'default-01'
103 temporarily committing pending changes (restore with 'hg unshelve --abort')
104 rebasing shelved changes
103 merging a/a 105 merging a/a
104 106
105 $ hg revert --all -q 107 $ hg revert --all -q
106 $ rm a/a.orig b.rename/b c.copy 108 $ rm a/a.orig b.rename/b c.copy
107 109
178 180
179 force a conflicted merge to occur 181 force a conflicted merge to occur
180 182
181 $ hg unshelve 183 $ hg unshelve
182 unshelving change 'default' 184 unshelving change 'default'
185 temporarily committing pending changes (restore with 'hg unshelve --abort')
186 rebasing shelved changes
183 merging a/a 187 merging a/a
184 warning: conflicts during merge. 188 warning: conflicts during merge.
185 merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark') 189 merging a/a incomplete! (edit conflicts, then use 'hg resolve --mark')
186 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') 190 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
187 [1] 191 [1]
361 365
362 if we resolve a conflict while unshelving, the unshelve should succeed 366 if we resolve a conflict while unshelving, the unshelve should succeed
363 367
364 $ HGMERGE=true hg unshelve 368 $ HGMERGE=true hg unshelve
365 unshelving change 'default' 369 unshelving change 'default'
370 temporarily committing pending changes (restore with 'hg unshelve --abort')
371 rebasing shelved changes
366 merging a/a 372 merging a/a
367 $ hg parents -q 373 $ hg parents -q
368 4:33f7f61e6c5e 374 4:33f7f61e6c5e
369 $ hg shelve -l 375 $ hg shelve -l
370 $ hg status 376 $ hg status
434 $ hg rebase -d 1 --config extensions.rebase= 440 $ hg rebase -d 1 --config extensions.rebase=
435 merging x 441 merging x
436 saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob) 442 saved backup bundle to $TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-backup.hg (glob)
437 $ hg unshelve 443 $ hg unshelve
438 unshelving change 'default' 444 unshelving change 'default'
445 rebasing shelved changes
439 $ hg status 446 $ hg status
440 M z 447 M z
441 448
442 $ cd .. 449 $ cd ..
443 450
459 shelved as default 466 shelved as default
460 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 467 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
461 $ hg up -q 1 468 $ hg up -q 1
462 $ hg unshelve 469 $ hg unshelve
463 unshelving change 'default' 470 unshelving change 'default'
471 rebasing shelved changes
464 $ hg status 472 $ hg status
465 A d 473 A d
466 474
467 unshelve should work on an ancestor of the original commit 475 unshelve should work on an ancestor of the original commit
468 476
471 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 479 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
472 $ hg up 0 480 $ hg up 0
473 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 481 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
474 $ hg unshelve 482 $ hg unshelve
475 unshelving change 'default' 483 unshelving change 'default'
484 rebasing shelved changes
476 $ hg status 485 $ hg status
477 A d 486 A d
478 487
479 test bug 4073 we need to enable obsolete markers for it 488 test bug 4073 we need to enable obsolete markers for it
480 489