D5200: fix: add a config to abort when a fixer tool fails

Yuya Nishihara yuya at tcha.org
Sat Nov 3 01:30:36 UTC 2018


Looks good, but test-check-config.t failed probably because the doc couldn't
be found by the checker.

> @@ -464,9 +488,14 @@
>                  showstderr(ui, fixctx.rev(), fixername, stderr)
>              if proc.returncode == 0:
>                  newdata = newerdata
> -            elif not stderr:
> -                showstderr(ui, fixctx.rev(), fixername,
> -                           _('exited with status %d\n') % (proc.returncode,))
> +            else:
> +                if not stderr:
> +                    message = _('exited with status %d\n') % (proc.returncode,)
> +                    showstderr(ui, fixctx.rev(), fixername, message)
> +                checktoolfailureaction(
> +                    ui, _('no fixes will be applied'),
> +                    hint=_('use --config fix.failure=continue to apply any '
> +                           'successful fixes anyway'))

This runs after fork(), but it should work as long as no user interaction is
required.


More information about the Mercurial-devel mailing list