Mercurial > hg
comparison tests/test-check-code.t @ 31726:bdb72dd3957e
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
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 29 Mar 2017 12:14:20 -0700 |
parents | f1e0446e804c |
children | 0e4f70f63aaa |
comparison
equal
deleted
inserted
replaced
31725:c777b12cdc9b | 31726:bdb72dd3957e |
---|---|
55 >>> for i, command in enumerate(scommands): | 55 >>> for i, command in enumerate(scommands): |
56 ... if command != commands[i]: | 56 ... if command != commands[i]: |
57 ... print('commands in debugcommands.py not sorted; first differing ' | 57 ... print('commands in debugcommands.py not sorted; first differing ' |
58 ... 'command is %s; expected %s' % (commands[i], command)) | 58 ... 'command is %s; expected %s' % (commands[i], command)) |
59 ... break | 59 ... break |
60 | |
61 Prevent adding new files in the root directory accidentally. | |
62 | |
63 $ hg files 'glob:*' | |
64 .editorconfig | |
65 .hgignore | |
66 .hgsigs | |
67 .hgtags | |
68 CONTRIBUTING | |
69 CONTRIBUTORS | |
70 COPYING | |
71 Makefile | |
72 README | |
73 hg | |
74 hgeditor | |
75 hgweb.cgi | |
76 setup.py |