Patchwork D9953: tests: add a comment in a test that will hopefully save someone some time

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2021, 1:16 a.m.
Message ID <differential-rev-PHID-DREV-lcuqklyev5tclngioeei-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48264/
State Superseded
Headers show

Comments

phabricator - Feb. 4, 2021, 1:16 a.m.
spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I spent at least an hour, probably closer to 1.5, trying to figure out what this
  was complaining about. Hopefully anyone else in my position will see this note
  and not waste the time.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9953

AFFECTED FILES
  tests/test-check-module-imports.t

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t
--- a/tests/test-check-module-imports.t
+++ b/tests/test-check-module-imports.t
@@ -14,6 +14,10 @@ 
 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
+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' \
   > -X hgweb.cgi \