# HG changeset patch # User Pierre-Yves David # Date 2024-10-08 18:50:46 # Node ID 7b8769cca23dc78e9dd0f0eec52dcc467c76ddcb # Parent a9b1acca2b14208eb1e3ac2e73985ecc588bcc6f doctest: use the system hg to find the list of file to tests Same as what we do for the `.t` tests, but more manually. diff --git a/tests/test-doctest.py b/tests/test-doctest.py --- a/tests/test-doctest.py +++ b/tests/test-doctest.py @@ -69,8 +69,13 @@ cwd = os.path.dirname(os.environ["TESTDI if not os.path.isdir(os.path.join(cwd, ".hg")): sys.exit(0) +files_cmd = "hg files --print0 \"%s\"" % fileset + +if 'HGTEST_RESTOREENV' in os.environ: + files_cmd = '. $HGTEST_RESTOREENV; ' + files_cmd + files = subprocess.check_output( - "hg files --print0 \"%s\"" % fileset, + files_cmd, shell=True, cwd=cwd, ).split(b'\0')