Mercurial > hg
diff hgext/rebase.py @ 39094:2cf0b8b830ba
rebase: raise error for options conflicting with --stop
Make sure --stop feature raise error for conflicting options
--continue, --abort, --confirm, --dry-run. Tests are added to
reflect the same.
Differential Revision: https://phab.mercurial-scm.org/D3969
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sun, 22 Jul 2018 22:04:49 +0530 |
parents | cc37009e95ca |
children | 571361e47137 |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Jul 18 00:25:52 2018 +0530 +++ b/hgext/rebase.py Sun Jul 22 22:04:49 2018 +0530 @@ -805,6 +805,12 @@ inmemory = ui.configbool('rebase', 'experimental.inmemory') dryrun = opts.get('dry_run') stop = opts.get('stop') + 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')) @@ -841,7 +847,6 @@ rbsrt = rebaseruntime(repo, ui) rbsrt.restorestatus() - #todo: raise error for conflicting options if rbsrt.collapsef: raise error.Abort(_("cannot stop in --collapse session")) allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)