D6566: abort: added logic for of hg abort

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Jul 9 06:25:12 EDT 2019


pulkit added a comment.


  > hg abort currently supports --dry-run/-n flag only.
  > It is used to dry run hg abort
  
  We should specify what does dry run does i.e. it prints the operation which will be aborted if `hg abort` is run.

INLINE COMMENTS

> commands.py:139
> +def abort(ui, repo, **opts):
> +    """abort an unfinished operation(EXPERIMENTAL)
> +

You need a space between operation and (EXPERIMENTAL)

> commands.py:153
> +    if not abortstate.abortfunc:
> +        raise error.Abort((_("%s does not support 'hg abort'") %
> +                            (abortstate._opname)), hint=abortstate.hint())

`%s is in progress but does not support 'hg abort'`.

> commands.py:158
> +        return
> +    return abortstate.abortfunc(ui, repo, **opts)
> +

Now that we don't have backup flag, and --dry-run is tackled before calling abortfunc, we can prevent passing `**opts`.

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