Show More
@@ -574,6 +574,7 b' def unshelvecontinue(ui, repo, state, op' | |||
|
574 | 574 | _('continue an incomplete unshelve operation')), |
|
575 | 575 | ('k', 'keep', None, |
|
576 | 576 | _('keep shelve after unshelving')), |
|
577 | ('t', 'tool', '', _('specify merge tool')), | |
|
577 | 578 | ('', 'date', '', |
|
578 | 579 | _('set date for temporary commits (DEPRECATED)'), _('DATE'))], |
|
579 | 580 | _('hg unshelve [SHELVED]')) |
@@ -620,6 +621,8 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
620 | 621 | if shelved: |
|
621 | 622 | raise error.Abort(_('cannot combine abort/continue with ' |
|
622 | 623 | 'naming a shelved change')) |
|
624 | if abortf and opts.get('tool', False): | |
|
625 | ui.warn(_('tool option will be ignored\n')) | |
|
623 | 626 | |
|
624 | 627 | try: |
|
625 | 628 | state = shelvedstate.load(repo) |
@@ -648,7 +651,9 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
648 | 651 | |
|
649 | 652 | oldquiet = ui.quiet |
|
650 | 653 | wlock = lock = tr = None |
|
654 | forcemerge = ui.backupconfig('ui', 'forcemerge') | |
|
651 | 655 | try: |
|
656 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'unshelve') | |
|
652 | 657 | wlock = repo.wlock() |
|
653 | 658 | lock = repo.lock() |
|
654 | 659 | |
@@ -706,6 +711,7 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
706 | 711 | 'rev' : [shelvectx.rev()], |
|
707 | 712 | 'dest' : str(tmpwctx.rev()), |
|
708 | 713 | 'keep' : True, |
|
714 | 'tool' : opts.get('tool', ''), | |
|
709 | 715 | }) |
|
710 | 716 | except error.InterventionRequired: |
|
711 | 717 | tr.close() |
@@ -744,6 +750,7 b' def unshelve(ui, repo, *shelved, **opts)' | |||
|
744 | 750 | if tr: |
|
745 | 751 | tr.release() |
|
746 | 752 | lockmod.release(lock, wlock) |
|
753 | ui.restoreconfig(forcemerge) | |
|
747 | 754 | |
|
748 | 755 | @command('shelve', |
|
749 | 756 | [('A', 'addremove', None, |
@@ -469,6 +469,29 b' set up another conflict between a commit' | |||
|
469 | 469 | |
|
470 | 470 | if we resolve a conflict while unshelving, the unshelve should succeed |
|
471 | 471 | |
|
472 | $ hg unshelve --tool :merge-other --keep | |
|
473 | unshelving change 'default' | |
|
474 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
|
475 | rebasing shelved changes | |
|
476 | rebasing 6:c5e6910e7601 "changes to 'second'" (tip) | |
|
477 | merging a/a | |
|
478 | $ hg parents -q | |
|
479 | 4:33f7f61e6c5e | |
|
480 | $ hg shelve -l | |
|
481 | default (*)* changes to 'second' (glob) | |
|
482 | $ hg status | |
|
483 | M a/a | |
|
484 | A foo/foo | |
|
485 | $ cat a/a | |
|
486 | a | |
|
487 | c | |
|
488 | a | |
|
489 | $ cat > a/a << EOF | |
|
490 | > a | |
|
491 | > c | |
|
492 | > x | |
|
493 | > EOF | |
|
494 | ||
|
472 | 495 | $ HGMERGE=true hg unshelve |
|
473 | 496 | unshelving change 'default' |
|
474 | 497 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
@@ -730,7 +753,8 b' unshelve and conflicts with tracked and ' | |||
|
730 | 753 | >>>>>>> source: 23b29cada8ba - shelve: changes to 'commit stuff' |
|
731 | 754 | $ cat f.orig |
|
732 | 755 | g |
|
733 | $ hg unshelve --abort | |
|
756 | $ hg unshelve --abort -t false | |
|
757 | tool option will be ignored | |
|
734 | 758 | rebase aborted |
|
735 | 759 | unshelve of 'default' aborted |
|
736 | 760 | $ hg st |
General Comments 0
You need to be logged in to leave comments.
Login now