##// END OF EJS Templates
record: add interactive option to the commit command
Laurent Charignon -
r24278:0b94b68a default
parent child Browse files
Show More
@@ -18,7 +18,8 b" testedwith = 'internal'"
18
18
19 @command("record",
19 @command("record",
20 # same options as commit + white space diff options
20 # same options as commit + white space diff options
21 commands.table['^commit|ci'][1][:] + commands.diffwsopts,
21 [c for c in commands.table['^commit|ci'][1][:]
22 if c[1] != "interactive"] + commands.diffwsopts,
22 _('hg record [OPTION]... [FILE]...'))
23 _('hg record [OPTION]... [FILE]...'))
23 def record(ui, repo, *pats, **opts):
24 def record(ui, repo, *pats, **opts):
24 '''interactively select changes to commit
25 '''interactively select changes to commit
@@ -1383,6 +1383,7 b' def clone(ui, source, dest=None, **opts)'
1383 ('', 'amend', None, _('amend the parent of the working dir')),
1383 ('', 'amend', None, _('amend the parent of the working dir')),
1384 ('s', 'secret', None, _('use the secret phase for committing')),
1384 ('s', 'secret', None, _('use the secret phase for committing')),
1385 ('e', 'edit', None, _('invoke editor on commit messages')),
1385 ('e', 'edit', None, _('invoke editor on commit messages')),
1386 ('i', 'interactive', None, _('use interactive mode')),
1386 ] + walkopts + commitopts + commitopts2 + subrepoopts,
1387 ] + walkopts + commitopts + commitopts2 + subrepoopts,
1387 _('[OPTION]... [FILE]...'),
1388 _('[OPTION]... [FILE]...'),
1388 inferrepo=True)
1389 inferrepo=True)
@@ -1422,6 +1423,11 b' def commit(ui, repo, *pats, **opts):'
1422
1423
1423 Returns 0 on success, 1 if nothing changed.
1424 Returns 0 on success, 1 if nothing changed.
1424 """
1425 """
1426 if opts.get('interactive'):
1427 opts.pop('interactive')
1428 cmdutil.dorecord(ui, repo, commit, 'commit', False, *pats, **opts)
1429 return
1430
1425 if opts.get('subrepos'):
1431 if opts.get('subrepos'):
1426 if opts.get('amend'):
1432 if opts.get('amend'):
1427 raise util.Abort(_('cannot amend with --subrepos'))
1433 raise util.Abort(_('cannot amend with --subrepos'))
@@ -202,7 +202,7 b' Show all commands + options'
202 add: include, exclude, subrepos, dry-run
202 add: include, exclude, subrepos, dry-run
203 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude, template
203 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude, template
204 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
204 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
205 commit: addremove, close-branch, amend, secret, edit, include, exclude, message, logfile, date, user, subrepos
205 commit: addremove, close-branch, amend, secret, edit, interactive, include, exclude, message, logfile, date, user, subrepos
206 diff: rev, change, text, git, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
206 diff: rev, change, text, git, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
207 export: output, switch-parent, rev, text, git, nodates
207 export: output, switch-parent, rev, text, git, nodates
208 forget: include, exclude
208 forget: include, exclude
General Comments 0
You need to be logged in to leave comments. Login now