Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
29128:e521cb13d354 | 29129:e6dfb0e4eeef |
---|---|
809 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of | 809 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
810 the python data internally passed to <command>. ``$HG_OPTS`` is a | 810 the python data internally passed to <command>. ``$HG_OPTS`` is a |
811 dictionary of options (with unspecified options set to their defaults). | 811 dictionary of options (with unspecified options set to their defaults). |
812 ``$HG_PATS`` is a list of arguments. Hook failure is ignored. | 812 ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
813 | 813 |
814 ``fail-<command>`` | |
815 Run after a failed invocation of an associated command. The contents | |
816 of the command line are passed as ``$HG_ARGS``. Parsed command line | |
817 arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain | |
818 string representations of the python data internally passed to | |
819 <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified | |
820 options set to their defaults). ``$HG_PATS`` is a list of arguments. | |
821 Hook failure is ignored. | |
822 | |
814 ``pre-<command>`` | 823 ``pre-<command>`` |
815 Run before executing the associated command. The contents of the | 824 Run before executing the associated command. The contents of the |
816 command line are passed as ``$HG_ARGS``. Parsed command line arguments | 825 command line are passed as ``$HG_ARGS``. Parsed command line arguments |
817 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string | 826 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
818 representations of the data internally passed to <command>. ``$HG_OPTS`` | 827 representations of the data internally passed to <command>. ``$HG_OPTS`` |