hgext/rebase.py
changeset 39098 a42506059522
parent 39097 c1a1fb389b4d
child 39099 3f9a5d746cf6
--- a/hgext/rebase.py	Wed Aug 15 10:32:10 2018 +0900
+++ b/hgext/rebase.py	Wed Aug 15 10:36:06 2018 +0900
@@ -807,12 +807,14 @@
     dryrun = opts.get('dry_run')
     confirm = opts.get('confirm')
     stop = opts.get('stop')
+    selactions = [k for k in ['abort', 'stop', 'continue'] if opts.get(k)]
+    if len(selactions) > 1:
+        raise error.Abort(_('cannot use --%s with --%s')
+                          % tuple(selactions[:2]))
     if stop:
         if opts.get('dry_run') or opts.get('confirm'):
             raise error.Abort(_('cannot use --stop with --dry-run '
                                 'or --confirm'))
-        if opts.get('abort') or opts.get('continue'):
-            raise error.Abort(_('cannot use --stop with --abort or --continue'))
     if dryrun:
         if opts.get('abort'):
             raise error.Abort(_('cannot specify both --dry-run and --abort'))
@@ -950,8 +952,6 @@
                 _('message can only be specified with collapse'))
 
         if contf or abortf:
-            if contf and abortf:
-                raise error.Abort(_('cannot use both abort and continue'))
             if rbsrt.collapsef:
                 raise error.Abort(
                     _('cannot use collapse with continue or abort'))