Mercurial > hg
diff mercurial/commands.py @ 24278:0b94b68aace9
record: add interactive option to the commit command
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 11 Mar 2015 15:22:04 -0700 |
parents | e1cb460a3524 |
children | 6ddc86eedc3b |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Mar 10 16:26:13 2015 -0700 +++ b/mercurial/commands.py Wed Mar 11 15:22:04 2015 -0700 @@ -1383,6 +1383,7 @@ ('', 'amend', None, _('amend the parent of the working dir')), ('s', 'secret', None, _('use the secret phase for committing')), ('e', 'edit', None, _('invoke editor on commit messages')), + ('i', 'interactive', None, _('use interactive mode')), ] + walkopts + commitopts + commitopts2 + subrepoopts, _('[OPTION]... [FILE]...'), inferrepo=True) @@ -1422,6 +1423,11 @@ Returns 0 on success, 1 if nothing changed. """ + if opts.get('interactive'): + opts.pop('interactive') + cmdutil.dorecord(ui, repo, commit, 'commit', False, *pats, **opts) + return + if opts.get('subrepos'): if opts.get('amend'): raise util.Abort(_('cannot amend with --subrepos'))