##// END OF EJS Templates
shelve: add -n/--name option to unshelve (issue5475)...
liscju -
r31021:4189d790 default
parent child Browse files
Show More
@@ -747,10 +747,12 b' def _checkunshelveuntrackedproblems(ui, '
747 _('continue an incomplete unshelve operation')),
747 _('continue an incomplete unshelve operation')),
748 ('k', 'keep', None,
748 ('k', 'keep', None,
749 _('keep shelve after unshelving')),
749 _('keep shelve after unshelving')),
750 ('n', 'name', '',
751 _('restore shelved change with given name'), _('NAME')),
750 ('t', 'tool', '', _('specify merge tool')),
752 ('t', 'tool', '', _('specify merge tool')),
751 ('', 'date', '',
753 ('', 'date', '',
752 _('set date for temporary commits (DEPRECATED)'), _('DATE'))],
754 _('set date for temporary commits (DEPRECATED)'), _('DATE'))],
753 _('hg unshelve [SHELVED]'))
755 _('hg unshelve [[-n] SHELVED]'))
754 def unshelve(ui, repo, *shelved, **opts):
756 def unshelve(ui, repo, *shelved, **opts):
755 """restore a shelved change to the working directory
757 """restore a shelved change to the working directory
756
758
@@ -795,6 +797,9 b' def _dounshelve(ui, repo, *shelved, **op'
795 continuef = opts.get('continue')
797 continuef = opts.get('continue')
796 if not abortf and not continuef:
798 if not abortf and not continuef:
797 cmdutil.checkunfinished(repo)
799 cmdutil.checkunfinished(repo)
800 shelved = list(shelved)
801 if opts.get("name"):
802 shelved.append(opts["name"])
798
803
799 if abortf or continuef:
804 if abortf or continuef:
800 if abortf and continuef:
805 if abortf and continuef:
@@ -493,7 +493,7 b' ensure that metadata-only changes are sh'
493 $ ln -s foo a/a
493 $ ln -s foo a/a
494 $ hg shelve -q -n symlink a/a
494 $ hg shelve -q -n symlink a/a
495 $ hg status a/a
495 $ hg status a/a
496 $ hg unshelve -q symlink
496 $ hg unshelve -q -n symlink
497 $ hg status a/a
497 $ hg status a/a
498 M a/a
498 M a/a
499 $ hg revert a/a
499 $ hg revert a/a
General Comments 0
You need to be logged in to leave comments. Login now