comparison mercurial/commands.py @ 24698:a85c4ed1132f

revert: do not requires '--all' if '--interative' is present The '--all' option have been introduced in 890e285c52a1 (August 2006), most probably to prevent user shooting themselves in the foot. As the record process will let you, view and select the set of files and change you want to revert, I feel like the '--all' flag is superfluous in the '--interactive' case.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 11 Apr 2015 12:26:54 -0400
parents e0e28e910fa3
children 077683371b7b
comparison
equal deleted inserted replaced
24697:52ff737c63d2 24698:a85c4ed1132f
5512 raise util.Abort(_('uncommitted merge with no revision specified'), 5512 raise util.Abort(_('uncommitted merge with no revision specified'),
5513 hint=_('use "hg update" or see "hg help revert"')) 5513 hint=_('use "hg update" or see "hg help revert"'))
5514 5514
5515 ctx = scmutil.revsingle(repo, opts.get('rev')) 5515 ctx = scmutil.revsingle(repo, opts.get('rev'))
5516 5516
5517 if not pats and not opts.get('all'): 5517 if not pats and not (opts.get('all') or opts.get('interactive')):
5518 msg = _("no files or directories specified") 5518 msg = _("no files or directories specified")
5519 if p2 != nullid: 5519 if p2 != nullid:
5520 hint = _("uncommitted merge, use --all to discard all changes," 5520 hint = _("uncommitted merge, use --all to discard all changes,"
5521 " or 'hg update -C .' to abort the merge") 5521 " or 'hg update -C .' to abort the merge")
5522 raise util.Abort(msg, hint=hint) 5522 raise util.Abort(msg, hint=hint)