##// END OF EJS Templates
rebase: consolidate check for --dry-run/--confirm on abort/stop/continue
Yuya Nishihara -
r39135:3f9a5d74 default
parent child Browse files
Show More
@@ -811,22 +811,13 b' def rebase(ui, repo, **opts):'
811 811 if len(selactions) > 1:
812 812 raise error.Abort(_('cannot use --%s with --%s')
813 813 % tuple(selactions[:2]))
814 if stop:
815 if opts.get('dry_run') or opts.get('confirm'):
816 raise error.Abort(_('cannot use --stop with --dry-run '
817 'or --confirm'))
818 if dryrun:
819 if opts.get('abort'):
820 raise error.Abort(_('cannot specify both --dry-run and --abort'))
821 if opts.get('continue'):
822 raise error.Abort(_('cannot specify both --dry-run and --continue'))
823 if confirm:
824 if opts.get('dry_run'):
825 raise error.Abort(_('cannot specify both --confirm and --dry-run'))
826 if opts.get('abort'):
827 raise error.Abort(_('cannot specify both --confirm and --abort'))
828 if opts.get('continue'):
829 raise error.Abort(_('cannot specify both --confirm and --continue'))
814 action = selactions[0] if selactions else None
815 if dryrun and action:
816 raise error.Abort(_('cannot specify both --dry-run and --%s') % action)
817 if confirm and action:
818 raise error.Abort(_('cannot specify both --confirm and --%s') % action)
819 if dryrun and confirm:
820 raise error.Abort(_('cannot specify both --confirm and --dry-run'))
830 821
831 822 if (opts.get('continue') or opts.get('abort') or
832 823 repo.currenttransaction() is not None):
@@ -2012,7 +2012,7 b' Test --stop raise errors with conflictin'
2012 2012 unresolved conflicts (see hg resolve, then hg rebase --continue)
2013 2013 [1]
2014 2014 $ hg rebase --stop --dry-run
2015 abort: cannot use --stop with --dry-run or --confirm
2015 abort: cannot specify both --dry-run and --stop
2016 2016 [255]
2017 2017
2018 2018 $ hg rebase -s 3 -d 5
General Comments 0
You need to be logged in to leave comments. Login now