# HG changeset patch # User Matt Harbison # Date 2020-12-14 23:03:29 # Node ID 8fa87bce492964eab812774eb59b12619db04b41 # Parent 3158522085f0b6e7ea73ed30c3e57f0d5a02690b 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 diff --git a/mercurial/hook.py b/mercurial/hook.py --- a/mercurial/hook.py +++ b/mercurial/hook.py @@ -157,6 +157,7 @@ def _exthook(ui, repo, htype, name, cmd, 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