comparison 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
comparison
equal deleted inserted replaced
46492:7289eac777ec 46493:b910be772eb9
1410 > pre-version.testing-default=echo '### default ###' plain: \${HGPLAIN:-'<unset>'} 1410 > pre-version.testing-default=echo '### default ###' plain: \${HGPLAIN:-'<unset>'}
1411 > pre-version.testing-yes=echo '### yes #######' plain: \${HGPLAIN:-'<unset>'} 1411 > pre-version.testing-yes=echo '### yes #######' plain: \${HGPLAIN:-'<unset>'}
1412 > pre-version.testing-yes:run-with-plain=yes 1412 > pre-version.testing-yes:run-with-plain=yes
1413 > pre-version.testing-no=echo '### no ########' plain: \${HGPLAIN:-'<unset>'} 1413 > pre-version.testing-no=echo '### no ########' plain: \${HGPLAIN:-'<unset>'}
1414 > pre-version.testing-no:run-with-plain=no 1414 > pre-version.testing-no:run-with-plain=no
1415 > pre-version.testing-auto=echo '### auto ######' plain: \${HGPLAIN:-'<unset>'}
1416 > pre-version.testing-auto:run-with-plain=auto
1415 > EOF 1417 > EOF
1416 1418
1417 $ (unset HGPLAIN; hg version --quiet) 1419 $ (unset HGPLAIN; hg version --quiet)
1418 ### default ### plain: 1 1420 ### default ### plain: 1
1419 ### yes ####### plain: 1 1421 ### yes ####### plain: 1
1420 ### no ######## plain: <unset> 1422 ### no ######## plain: <unset>
1423 ### auto ###### plain: <unset>
1421 Mercurial Distributed SCM (*) (glob) 1424 Mercurial Distributed SCM (*) (glob)
1422 1425
1423 $ HGPLAIN=1 hg version --quiet 1426 $ HGPLAIN=1 hg version --quiet
1424 ### default ### plain: 1 1427 ### default ### plain: 1
1425 ### yes ####### plain: 1 1428 ### yes ####### plain: 1
1426 ### no ######## plain: <unset> 1429 ### no ######## plain: <unset>
1430 ### auto ###### plain: 1
1427 Mercurial Distributed SCM (*) (glob) 1431 Mercurial Distributed SCM (*) (glob)