# HG changeset patch # User Jun Wu # Date 1490814860 25200 # Node ID bdb72dd3957eb4ab1e956cf278f85c8de06e2925 # Parent c777b12cdc9bcf9bf8f92fdea8f39a83a7f0ca59 test-check-code: prevent files being added to the root directory Adding new files in the root directory is probably a mistake, and is usually discouraged [1]. The test catches it to avoid mistakes like [2]. Modify the test if files need to be added in the root. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-July/086442.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095836.html diff -r c777b12cdc9b -r bdb72dd3957e tests/test-check-code.t --- a/tests/test-check-code.t Wed Mar 29 09:54:34 2017 -0400 +++ b/tests/test-check-code.t Wed Mar 29 12:14:20 2017 -0700 @@ -57,3 +57,20 @@ ... print('commands in debugcommands.py not sorted; first differing ' ... 'command is %s; expected %s' % (commands[i], command)) ... break + +Prevent adding new files in the root directory accidentally. + + $ hg files 'glob:*' + .editorconfig + .hgignore + .hgsigs + .hgtags + CONTRIBUTING + CONTRIBUTORS + COPYING + Makefile + README + hg + hgeditor + hgweb.cgi + setup.py