# HG changeset patch # User Arseniy Alekseyev # Date 1701710431 0 # Node ID 8b3cc36009ecc064ee5f2162bb4bd00bd6bcb972 # Parent e2632d9d1b6e369a08d64bf0ab10d7c54e493a5a tests: do not fail tests in a state with uncommitted .py file removal The problem is that [hg locate] lists removed files too. We use [hg files] instead because that does not list removed files. diff -r e2632d9d1b6e -r 8b3cc36009ec tests/test-check-module-imports.t --- a/tests/test-check-module-imports.t Sat Dec 02 00:52:37 2023 -0500 +++ b/tests/test-check-module-imports.t Mon Dec 04 17:20:31 2023 +0000 @@ -1,4 +1,4 @@ -#require test-repo hg10 +#require test-repo hg32 $ . "$TESTDIR/helpers-testrepo.sh" $ import_checker="$TESTDIR"/../contrib/import-checker.py @@ -14,12 +14,12 @@ Known-bad files are excluded by -X as some of them would produce unstable outputs, which should be fixed later. -NOTE: the `hg locate` command here only works on files that are known to +NOTE: the `hg files` command here only works on files that are known to Mercurial. If you add an import of a new file and haven't yet `hg add`ed it, you will likely receive warnings about a direct import. - $ testrepohg locate 'set:**.py or grep(r"^#!.*?python")' \ - > 'tests/**.t' \ + $ testrepohg files 'set:**.py or grep(r"^#!.*?python")' \ + > 'glob:tests/**.t' \ > -X hgweb.cgi \ > -X setup.py \ > -X contrib/automation/ \