diff options
author | Luke Granger-Brown <git@lukegb.com> | 2020-11-23 16:12:33 +0000 |
---|---|---|
committer | Luke Granger-Brown <git@lukegb.com> | 2020-11-23 16:12:33 +0000 |
commit | 226116f48272dbe25bb9d3b8fa138cf6b10ec8ef (patch) | |
tree | c796aa0073ba8c5b98284581e975ed01ac5f2e26 /tests/fetchMercurial.sh | |
parent | 1973669e868f4414b666d0fbd34f1a7a87322ae9 (diff) |
fetchMercurial: set HGPLAIN when invoking hg
Without setting HGPLAIN, the user's environment leaks into
hg invocations, which means that the output may not be in the
expected format.
HGPLAIN is the Mercurial-recommended solution for this in that
it's intended for uses by scripts and programs which are looking
to parse Mercurial's output in a consistent manner.
Diffstat (limited to 'tests/fetchMercurial.sh')
-rw-r--r-- | tests/fetchMercurial.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/fetchMercurial.sh b/tests/fetchMercurial.sh index af8ef8d5b..d8a4e09d2 100644 --- a/tests/fetchMercurial.sh +++ b/tests/fetchMercurial.sh @@ -15,6 +15,9 @@ hg init $repo echo '[ui]' >> $repo/.hg/hgrc echo 'username = Foobar <foobar@example.org>' >> $repo/.hg/hgrc +# Set ui.tweakdefaults to ensure HGPLAIN is being set. +echo 'tweakdefaults = True' >> $repo/.hg/hgrc + echo utrecht > $repo/hello touch $repo/.hgignore hg add --cwd $repo hello .hgignore |