Mercurial > hg
comparison hgext/shelve.py @ 24477:325f03de849d
shelve: add interactive mode command line option
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 25 Mar 2015 15:52:28 -0700 |
parents | cda18ded2c48 |
children | 95cbc77c0cad |
comparison
equal
deleted
inserted
replaced
24476:1378f20c8564 | 24477:325f03de849d |
---|---|
224 # ensure we are not creating a subdirectory or a hidden file | 224 # ensure we are not creating a subdirectory or a hidden file |
225 if '/' in name or '\\' in name: | 225 if '/' in name or '\\' in name: |
226 raise util.Abort(_('shelved change names may not contain slashes')) | 226 raise util.Abort(_('shelved change names may not contain slashes')) |
227 if name.startswith('.'): | 227 if name.startswith('.'): |
228 raise util.Abort(_("shelved change names may not start with '.'")) | 228 raise util.Abort(_("shelved change names may not start with '.'")) |
229 interactive = opts.get('interactive', False) | |
229 | 230 |
230 node = cmdutil.commit(ui, repo, commitfunc, pats, opts) | 231 node = cmdutil.commit(ui, repo, commitfunc, pats, opts) |
231 | 232 |
232 if not node: | 233 if not node: |
233 stat = repo.status(match=scmutil.match(repo[None], pats, opts)) | 234 stat = repo.status(match=scmutil.match(repo[None], pats, opts)) |
647 _('use text as shelve message'), _('TEXT')), | 648 _('use text as shelve message'), _('TEXT')), |
648 ('n', 'name', '', | 649 ('n', 'name', '', |
649 _('use the given name for the shelved commit'), _('NAME')), | 650 _('use the given name for the shelved commit'), _('NAME')), |
650 ('p', 'patch', None, | 651 ('p', 'patch', None, |
651 _('show patch')), | 652 _('show patch')), |
653 ('i', 'interactive', None, | |
654 _('interactive mode, only works while creating a shelve')), | |
652 ('', 'stat', None, | 655 ('', 'stat', None, |
653 _('output diffstat-style summary of changes'))] + commands.walkopts, | 656 _('output diffstat-style summary of changes'))] + commands.walkopts, |
654 _('hg shelve [OPTION]... [FILE]...')) | 657 _('hg shelve [OPTION]... [FILE]...')) |
655 def shelvecmd(ui, repo, *pats, **opts): | 658 def shelvecmd(ui, repo, *pats, **opts): |
656 '''save and set aside changes from the working directory | 659 '''save and set aside changes from the working directory |