Mercurial > public > mercurial-scm > hg-stable
diff tests/test-config.t @ 31690:d83e51654c8a
rcutil: let environ override system configs (BC)
This is BC because system configs won't be able to override $EDITOR, $PAGER.
The new behavior is arguably more rational.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sun, 26 Mar 2017 21:33:37 -0700 |
parents | 3f8f53190d6a |
children | e714159860fd |
line wrap: on
line diff
--- a/tests/test-config.t Sun Mar 26 21:27:02 2017 -0700 +++ b/tests/test-config.t Sun Mar 26 21:33:37 2017 -0700 @@ -164,3 +164,17 @@ $ HGEDITOR=false hg config --edit abort: edit failed: false exited with status 1 [255] + +config affected by environment variables + + $ EDITOR=e1 VISUAL=e2 hg config --debug | grep 'ui\.editor' + $VISUAL: ui.editor=e2 + + $ VISUAL=e2 hg config --debug --config ui.editor=e3 | grep 'ui\.editor' + --config: ui.editor=e3 + + $ PAGER=p1 hg config --debug | grep 'pager\.pager' + $PAGER: pager.pager=p1 + + $ PAGER=p1 hg config --debug --config pager.pager=p2 | grep 'pager\.pager' + --config: pager.pager=p2