Show More
@@ -0,0 +1,3 b'' | |||
|
1 | [tool.black] | |
|
2 | line-length = 80 | |
|
3 | exclude = 'build/|wheelhouse/|dist/|packages/|\.hg/|\.mypy_cache/|\.venv/|mercurial/thirdparty/|hgext/fsmonitor/pywatchman/|contrib/python-zstandard/' |
@@ -1,85 +1,86 b'' | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
4 | 4 | $ check_code="$TESTDIR"/../contrib/check-code.py |
|
5 | 5 | $ cd "$TESTDIR"/.. |
|
6 | 6 | |
|
7 | 7 | New errors are not allowed. Warnings are strongly discouraged. |
|
8 | 8 | (The writing "no-che?k-code" is for not skipping this file when checking.) |
|
9 | 9 | |
|
10 | 10 | $ testrepohg locate \ |
|
11 | 11 | > -X contrib/python-zstandard \ |
|
12 | 12 | > -X hgext/fsmonitor/pywatchman \ |
|
13 | 13 | > -X mercurial/thirdparty \ |
|
14 | 14 | > | sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false |
|
15 | 15 | Skipping contrib/automation/hgautomation/__init__.py it has no-che?k-code (glob) |
|
16 | 16 | Skipping contrib/automation/hgautomation/aws.py it has no-che?k-code (glob) |
|
17 | 17 | Skipping contrib/automation/hgautomation/cli.py it has no-che?k-code (glob) |
|
18 | 18 | Skipping contrib/automation/hgautomation/linux.py it has no-che?k-code (glob) |
|
19 | 19 | Skipping contrib/automation/hgautomation/pypi.py it has no-che?k-code (glob) |
|
20 | 20 | Skipping contrib/automation/hgautomation/ssh.py it has no-che?k-code (glob) |
|
21 | 21 | Skipping contrib/automation/hgautomation/try_server.py it has no-che?k-code (glob) |
|
22 | 22 | Skipping contrib/automation/hgautomation/windows.py it has no-che?k-code (glob) |
|
23 | 23 | Skipping contrib/automation/hgautomation/winrm.py it has no-che?k-code (glob) |
|
24 | 24 | Skipping contrib/packaging/hgpackaging/downloads.py it has no-che?k-code (glob) |
|
25 | 25 | Skipping contrib/packaging/hgpackaging/inno.py it has no-che?k-code (glob) |
|
26 | 26 | Skipping contrib/packaging/hgpackaging/py2exe.py it has no-che?k-code (glob) |
|
27 | 27 | Skipping contrib/packaging/hgpackaging/util.py it has no-che?k-code (glob) |
|
28 | 28 | Skipping contrib/packaging/hgpackaging/wix.py it has no-che?k-code (glob) |
|
29 | 29 | Skipping contrib/packaging/inno/build.py it has no-che?k-code (glob) |
|
30 | 30 | Skipping contrib/packaging/wix/build.py it has no-che?k-code (glob) |
|
31 | 31 | Skipping i18n/polib.py it has no-che?k-code (glob) |
|
32 | 32 | Skipping mercurial/statprof.py it has no-che?k-code (glob) |
|
33 | 33 | Skipping tests/badserverext.py it has no-che?k-code (glob) |
|
34 | 34 | |
|
35 | 35 | @commands in debugcommands.py should be in alphabetical order. |
|
36 | 36 | |
|
37 | 37 | >>> import re |
|
38 | 38 | >>> commands = [] |
|
39 | 39 | >>> with open('mercurial/debugcommands.py', 'rb') as fh: |
|
40 | 40 | ... for line in fh: |
|
41 | 41 | ... m = re.match(br"^@command\('([a-z]+)", line) |
|
42 | 42 | ... if m: |
|
43 | 43 | ... commands.append(m.group(1)) |
|
44 | 44 | >>> scommands = list(sorted(commands)) |
|
45 | 45 | >>> for i, command in enumerate(scommands): |
|
46 | 46 | ... if command != commands[i]: |
|
47 | 47 | ... print('commands in debugcommands.py not sorted; first differing ' |
|
48 | 48 | ... 'command is %s; expected %s' % (commands[i], command)) |
|
49 | 49 | ... break |
|
50 | 50 | |
|
51 | 51 | Prevent adding new files in the root directory accidentally. |
|
52 | 52 | |
|
53 | 53 | $ testrepohg files 'glob:*' |
|
54 | 54 | .arcconfig |
|
55 | 55 | .clang-format |
|
56 | 56 | .editorconfig |
|
57 | 57 | .hgignore |
|
58 | 58 | .hgsigs |
|
59 | 59 | .hgtags |
|
60 | 60 | .jshintrc |
|
61 | 61 | CONTRIBUTING |
|
62 | 62 | CONTRIBUTORS |
|
63 | 63 | COPYING |
|
64 | 64 | Makefile |
|
65 | 65 | README.rst |
|
66 | 66 | hg |
|
67 | 67 | hgeditor |
|
68 | 68 | hgweb.cgi |
|
69 | pyproject.toml | |
|
69 | 70 | setup.py |
|
70 | 71 | |
|
71 | 72 | Prevent adding modules which could be shadowed by ancient .so/.dylib. |
|
72 | 73 | |
|
73 | 74 | $ testrepohg files \ |
|
74 | 75 | > mercurial/base85.py \ |
|
75 | 76 | > mercurial/bdiff.py \ |
|
76 | 77 | > mercurial/diffhelpers.py \ |
|
77 | 78 | > mercurial/mpatch.py \ |
|
78 | 79 | > mercurial/osutil.py \ |
|
79 | 80 | > mercurial/parsers.py \ |
|
80 | 81 | > mercurial/zstd.py |
|
81 | 82 | [1] |
|
82 | 83 | |
|
83 | 84 | Keep python3 tests sorted: |
|
84 | 85 | $ sort < contrib/python3-whitelist > $TESTTMP/py3sorted |
|
85 | 86 | $ cmp contrib/python3-whitelist $TESTTMP/py3sorted || echo 'Please sort passing tests!' |
General Comments 0
You need to be logged in to leave comments.
Login now