diff tests/test-hook.t @ 46493:b910be772eb9 stable

hooks: add a `auto` value for `hooks.*run-with-plain` That setting restore the behavior pre-5.6. The current HGPLAIN value is simply passed to the hooks. This allow user who needs it to fully mitigate the behavior change introduced in Mercurial 5.7 by restoring the older behavior. Differential Revision: https://phab.mercurial-scm.org/D9982
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 10 Feb 2021 23:03:54 +0100
parents 7289eac777ec
children d67732a4b58a
line wrap: on
line diff
--- a/tests/test-hook.t	Wed Feb 10 23:21:21 2021 +0100
+++ b/tests/test-hook.t	Wed Feb 10 23:03:54 2021 +0100
@@ -1412,16 +1412,20 @@
   > pre-version.testing-yes:run-with-plain=yes
   > pre-version.testing-no=echo '### no ########' plain: \${HGPLAIN:-'<unset>'}
   > pre-version.testing-no:run-with-plain=no
+  > pre-version.testing-auto=echo '### auto ######' plain: \${HGPLAIN:-'<unset>'}
+  > pre-version.testing-auto:run-with-plain=auto
   > EOF
 
   $ (unset HGPLAIN; hg version --quiet)
   ### default ### plain: 1
   ### yes ####### plain: 1
   ### no ######## plain: <unset>
+  ### auto ###### plain: <unset>
   Mercurial Distributed SCM (*) (glob)
 
   $ HGPLAIN=1 hg version --quiet
   ### default ### plain: 1
   ### yes ####### plain: 1
   ### no ######## plain: <unset>
+  ### auto ###### plain: 1
   Mercurial Distributed SCM (*) (glob)