diff 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
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Apr 09 16:18:38 2015 -0400
+++ b/mercurial/commands.py	Sat Apr 11 12:26:54 2015 -0400
@@ -5514,7 +5514,7 @@
 
     ctx = scmutil.revsingle(repo, opts.get('rev'))
 
-    if not pats and not opts.get('all'):
+    if not pats and not (opts.get('all') or opts.get('interactive')):
         msg = _("no files or directories specified")
         if p2 != nullid:
             hint = _("uncommitted merge, use --all to discard all changes,"