D3757: rebase: add dry-run functionality

Yuya Nishihara yuya at tcha.org
Sun Jun 17 04:45:50 EDT 2018


> +    dryrun = opts.get(r'dry_run')
> +    if dryrun:
> +        if opts.get(r'abort'):
> +                raise error.Abort(_('cannot specify both --dry-run and --abort'))
> +        if opts.get(r'continue'):
> +                raise error.Abort(_('cannot specify both --dry-run and --continue'))

Please remove the excessive 4 spaces before the "raise".

> +    if dryrun:
> +        try:
> +            overrides = {('rebase', 'singletransaction'): True}
> +            with ui.configoverride(overrides, 'rebase'):
> +                _origrebase(ui, repo, inmemory=True, dryrun=dryrun, **opts)

I meant the argument name `dryrun=` is misleading because it actually does
rebase so `inmemory=True` and `_origrebase(ui, repo, abort=True)` are required.
I think it's something like `leaveunfinished=`.


More information about the Mercurial-devel mailing list