diff mercurial/help/config.txt @ 29129:e6dfb0e4eeef

dispatch: add fail-* family of hooks The post-* family of hooks will not run in case a command fails (i.e. raises an exception). This makes it inconvenient to hook into events such as doing something in case of a failed push. We catch all exceptions to run the failure hook. I am not sure if this is too aggressive, but tests apparently pass.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Thu, 28 Apr 2016 10:37:47 -0400
parents 29a7d591ff42
children f0ccb6cde3e5
line wrap: on
line diff
--- a/mercurial/help/config.txt	Fri May 06 22:21:32 2016 +0530
+++ b/mercurial/help/config.txt	Thu Apr 28 10:37:47 2016 -0400
@@ -811,6 +811,15 @@
   dictionary of options (with unspecified options set to their defaults).
   ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
 
+``fail-<command>``
+  Run after a failed invocation of an associated command. The contents
+  of the command line are passed as ``$HG_ARGS``. Parsed command line
+  arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain
+  string representations of the python data internally passed to
+  <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified
+  options set to their defaults). ``$HG_PATS`` is a list of arguments.
+  Hook failure is ignored.
+
 ``pre-<command>``
   Run before executing the associated command. The contents of the
   command line are passed as ``$HG_ARGS``. Parsed command line arguments