Error-suppression and redirection extensions, interest in another piece?

Augie Fackler raf at durin42.com
Tue Apr 5 15:17:20 EDT 2016


On Tue, Apr 5, 2016 at 2:52 PM, Martijn Pieters <mj at zopatista.com> wrote:
> Hi all,
>
> This past week I sent two related patches; one refactoring the
> commandfailure handler into a function, another adding a new
> experimental extension called logtoprocess.
>
> These two pieces are part of an effort to upstream an internal
> extension called *errorredirect*. This extension would suppress the
> warning message and traceback produced by dispatch on
> commandexception, and instead piped the traceback to an external
> process (synchronously), before exiting with sys.exit(1). The goal
> here was to funnel any errors in extensions or Mercurial itself that
> our developers at Facebook might trigger, to our internal
> infrastructure for further analysis and retrieval, and to replace the
> error message with a custom one that told the developer how to check
> if they were alone in seeing this problem and how to get further help.
>
> With logtoprocess and the refactoring in place, that extension could
> now be replaced with a configuration for logtoprocess (sending
> commandfailure output to the same external shell command, albeit with
> some slight tweaks) and a teeny-tiny extension that replaces most of
> dispatch.handlecommandexception() with a ui.log() call and
> sys.exit(1).
>
> Is there any interest in us providing this small extension? I believe
> that Augie has expressed interest in this for Google.

I know this would be hugely useful to us (especially if we can tuck
some extra things like versions and relevant environment variables in
the output), and I suspect it would be of value to most institutional
users of Mercurial.

>
> --
> Martijn Pieters
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list