2014-08-06 20:53:08 +04:00
|
|
|
#require test-repo
|
2014-05-05 22:42:58 +04:00
|
|
|
|
2016-05-11 07:49:27 +03:00
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
2011-11-23 05:50:58 +04:00
|
|
|
$ check_code="$TESTDIR"/../contrib/check-code.py
|
|
|
|
$ cd "$TESTDIR"/..
|
|
|
|
|
2013-07-06 23:47:56 +04:00
|
|
|
New errors are not allowed. Warnings are strongly discouraged.
|
2014-01-08 01:29:15 +04:00
|
|
|
(The writing "no-che?k-code" is for not skipping this file when checking.)
|
2013-07-06 23:47:56 +04:00
|
|
|
|
2017-07-02 07:14:20 +03:00
|
|
|
$ testrepohg locate -X contrib/python-zstandard \
|
|
|
|
> -X hgext/fsmonitor/pywatchman |
|
2017-04-07 08:10:46 +03:00
|
|
|
> sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false
|
2014-01-08 01:29:15 +04:00
|
|
|
Skipping i18n/polib.py it has no-che?k-code (glob)
|
|
|
|
Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
|
|
|
|
Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
|
2016-11-02 04:54:03 +03:00
|
|
|
Skipping mercurial/statprof.py it has no-che?k-code (glob)
|
2017-04-14 08:19:28 +03:00
|
|
|
Skipping tests/badserverext.py it has no-che?k-code (glob)
|
2016-11-25 20:55:05 +03:00
|
|
|
|
|
|
|
@commands in debugcommands.py should be in alphabetical order.
|
|
|
|
|
|
|
|
>>> import re
|
|
|
|
>>> commands = []
|
|
|
|
>>> with open('mercurial/debugcommands.py', 'rb') as fh:
|
|
|
|
... for line in fh:
|
|
|
|
... m = re.match("^@command\('([a-z]+)", line)
|
|
|
|
... if m:
|
|
|
|
... commands.append(m.group(1))
|
|
|
|
>>> scommands = list(sorted(commands))
|
|
|
|
>>> for i, command in enumerate(scommands):
|
|
|
|
... if command != commands[i]:
|
|
|
|
... print('commands in debugcommands.py not sorted; first differing '
|
|
|
|
... 'command is %s; expected %s' % (commands[i], command))
|
|
|
|
... break
|
2017-03-29 22:14:20 +03:00
|
|
|
|
|
|
|
Prevent adding new files in the root directory accidentally.
|
|
|
|
|
2017-07-02 07:14:20 +03:00
|
|
|
$ testrepohg files 'glob:*'
|
2017-03-29 22:14:20 +03:00
|
|
|
.editorconfig
|
|
|
|
.hgignore
|
|
|
|
.hgsigs
|
|
|
|
.hgtags
|
|
|
|
CONTRIBUTING
|
|
|
|
CONTRIBUTORS
|
|
|
|
COPYING
|
|
|
|
Makefile
|
|
|
|
README
|
|
|
|
hg
|
|
|
|
hgeditor
|
|
|
|
hgweb.cgi
|
|
|
|
setup.py
|