# HG changeset patch # User Arseniy Alekseyev # Date 1728299328 -3600 # Node ID 479899e538164496a0b485b05bfb3b0d8894fad8 # Parent f1312d0803a80fc7f176f9a91e4e38e92314eacd tests: hopefully fix `test-doctest.py` on Windows and more 1. Shell syntax understood by `shell=True` depends on the platform. Instead, pass `shell=False` and call `sh` explicitly to interpret the command correctly. 2. Stop setting `HGRCPATH=/dev/null`, so the setting `experimental.evolution=createmarkers` is set correctly. The reason I set HGRCPATH to /dev/null previously is because of misunderstanding where I thought the Python script had no HGRC to edit. As it turns out, there is in fact a valid temporary HGRC pointed to by HGRCPATH in this context so we don't seem to need this. /shrug diff -r f1312d0803a8 -r 479899e53816 tests/test-doctest.py --- a/tests/test-doctest.py Sat Oct 26 13:56:46 2024 -0400 +++ b/tests/test-doctest.py Mon Oct 07 12:08:48 2024 +0100 @@ -72,9 +72,13 @@ sys.exit(0) files = subprocess.check_output( - "HGRCPATH=/dev/null . helpers-testrepo.sh; testrepohg files --print0 \"%s\"" - % fileset, - shell=True, + [ + "sh", + "-c", + "set -e; . helpers-testrepo.sh; testrepohg files --print0 \"%s\"" + % fileset, + ], + shell=False, cwd=cwd, ).split(b'\0')