Mercurial > evolve
comparison tests/test-doctest.py @ 6913:3c5966b42c21 mercurial-5.7
test-compat: merge mercurial-5.8 into mercurial-5.7
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 25 Oct 2024 16:31:50 +0400 |
parents | 16fd24f6cf22 |
children |
comparison
equal
deleted
inserted
replaced
6808:c7d3e1d8c6f1 | 6913:3c5966b42c21 |
---|---|
65 sys.path.insert(0, cwd) | 65 sys.path.insert(0, cwd) |
66 | 66 |
67 if not os.path.isdir(os.path.join(cwd, ".hg")): | 67 if not os.path.isdir(os.path.join(cwd, ".hg")): |
68 sys.exit(0) | 68 sys.exit(0) |
69 | 69 |
70 files = subprocess.check_output( | 70 files_cmd = 'hg files --print0 "%s"' % fileset |
71 "hg files --print0 \"%s\"" % fileset, | 71 |
72 shell=True, | 72 # we prefer system hg for reading the repository, unless we're on python2 |
73 cwd=cwd, | 73 # because then we assume that system hg is too old (this is not always true, |
74 ).split(b'\0') | 74 # but it's an easy check and works well enough for us) |
75 if ispy3 and 'HGTEST_RESTOREENV': | |
76 files_cmd = '. $HGTEST_RESTOREENV; ' + files_cmd | |
77 | |
78 files = subprocess.check_output(files_cmd, shell=True, cwd=cwd).split(b'\0') | |
75 | 79 |
76 if sys.version_info[0] >= 3: | 80 if sys.version_info[0] >= 3: |
77 cwd = os.fsencode(cwd) | 81 cwd = os.fsencode(cwd) |
78 | 82 |
79 mods_tested = set() | 83 mods_tested = set() |