D6566: abort: added logic for of hg abort

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Jul 5 17:49:31 EDT 2019


pulkit added inline comments.

INLINE COMMENTS

> commands.py:135
>  
> + at command('abort',
> +    [('', 'no-backup', False, _('do not save backup copies of files')),

Can you mark this command as experimental for now, we will be close to release soon. Marking this as experimental will help us take more time to smoothen things out.

> commands.py:136
> + at command('abort',
> +    [('', 'no-backup', False, _('do not save backup copies of files')),
> +    ] + dryrunopts, helpcategory=command.CATEGORY_CHANGE_MANAGEMENT,

This help should be `'do not save backup bundle'` as similar to strip command.

> commands.py:142
> +
> +    Aborts an multistep operation like graft, histedit, rebase, merge,
> +    and unshelve if they are in an unfinished state.

s/an/a

> commands.py:154
> +    abortstate = None
> +    dryrun = opts.get('dry_run')
> +    for state in statemod._unfinishedstates:

need to prepend `r''` in front of dry_run for py3 compat.

> commands.py:165
> +    if dryrun:
> +        ui.status(_('aborting %s\n') % (abortstate._opname))
> +    return abortstate.abortfunc(ui, repo, **opts)

we should return here so that `abortstate.abortfunc()` is not called below in case of dry-run.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6566/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6566

To: taapas1128, #hg-reviewers
Cc: pulkit, martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list