tests: do not fail tests in a state with uncommitted .py file removal stable
authorArseniy Alekseyev <aalekseyev@janestreet.com>
Mon, 04 Dec 2023 17:20:31 +0000
branchstable
changeset 51150 8b3cc36009ec
parent 51149 e2632d9d1b6e
child 51151 2705748ba166
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.
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/ \