Mercurial > hg
diff tests/test-hgrc.t @ 13849:9f97de157aad
HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
This makes it possible to gain the benefits of HGPLAIN for scripting
while preserving different behaviors like internationalization.
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Wed, 05 Jan 2011 00:18:36 +1100 |
parents | 1bb2a56a9d73 |
children | be0daa0eeb3e |
line wrap: on
line diff
--- a/tests/test-hgrc.t Thu Mar 31 17:37:33 2011 -0700 +++ b/tests/test-hgrc.t Wed Jan 05 00:18:36 2011 +1100 @@ -133,3 +133,39 @@ none: ui.verbose=False none: ui.debug=True none: ui.quiet=False + +plain mode with exceptions + + $ cat > plain.py <<EOF + > def uisetup(ui): + > ui.write('plain: %r\n' % ui.plain()) + > EOF + $ echo "[extensions]" >> $HGRCPATH + $ echo "plain=./plain.py" >> $HGRCPATH + $ HGPLAINEXCEPT=; export HGPLAINEXCEPT + $ hg showconfig --config ui.traceback=True --debug + plain: [''] + read config from: $TESTTMP/hgrc + $TESTTMP/hgrc:15: extensions.plain=./plain.py + none: ui.traceback=True + none: ui.verbose=False + none: ui.debug=True + none: ui.quiet=False + $ unset HGPLAIN + $ hg showconfig --config ui.traceback=True --debug + plain: [''] + read config from: $TESTTMP/hgrc + $TESTTMP/hgrc:15: extensions.plain=./plain.py + none: ui.traceback=True + none: ui.verbose=False + none: ui.debug=True + none: ui.quiet=False + $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT + $ hg showconfig --config ui.traceback=True --debug + plain: ['i18n'] + read config from: $TESTTMP/hgrc + $TESTTMP/hgrc:15: extensions.plain=./plain.py + none: ui.traceback=True + none: ui.verbose=False + none: ui.debug=True + none: ui.quiet=False