D6566: abort: added logic for of hg abort

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Jul 4 15:00:31 UTC 2019


pulkit added inline comments.

INLINE COMMENTS

> commands.py:166
> +
> +    if nobackup:
> +        arglist = inspect.getargspec(abortstate.abortfunc)[0]

Arguments for abort can increase in future. Rather pass the opts directly to abort functions for now and make related functions look for flag which they need.

I agree it's not nice, but seems like a good tradeoff to start and have better code.

> commands.py:173
> +    if dryrun:
> +        raise error.Abort(_('aborting %s') % (abortstate._opname))
> +

should be `ui.status()` instead of `error.Abort()`

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