Mercurial > hg
changeset 46137:8fa87bce4929
hook: set `HGPLAIN=1` for external hooks
External hooks will probably turn around and run hg commands, so this seems like
a reasonable convenience for people who miss it in the documentation.
There are no test changes because `printenv.py` filters out anything without a
"HG_" prefix. It wouldn't be a useful test anyway, because this is already
inherited from the test environment.
Differential Revision: https://phab.mercurial-scm.org/D9605
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 14 Dec 2020 18:03:29 -0500 |
parents | 3158522085f0 |
children | 34f2c634c8f6 |
files | mercurial/hook.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hook.py Mon Dec 14 17:59:10 2020 -0500 +++ b/mercurial/hook.py Mon Dec 14 18:03:29 2020 -0500 @@ -157,6 +157,7 @@ env[b'HG_PENDING'] = repo.root env[b'HG_HOOKTYPE'] = htype env[b'HG_HOOKNAME'] = name + env[b'HGPLAIN'] = b'1' for k, v in pycompat.iteritems(args): # transaction changes can accumulate MBs of data, so skip it