Show More
|
1 | NO CONTENT: file renamed from pyproject.toml to black.toml |
@@ -1,15 +1,15 | |||
|
1 | 1 | [fix] |
|
2 | 2 | clang-format:command = clang-format --style file -i |
|
3 | 3 | clang-format:pattern = (**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist" |
|
4 | 4 | |
|
5 | 5 | rustfmt:command = rustfmt {rootpath} |
|
6 | 6 | rustfmt:pattern = set:**.rs |
|
7 | 7 | |
|
8 | 8 | # We use black, but currently with |
|
9 | 9 | # https://github.com/psf/black/pull/826 applied. For now |
|
10 | 10 | # contrib/grey.py is our fork of black. You need to pip install |
|
11 | 11 | # git+https://github.com/python/black/@d9e71a75ccfefa3d9156a64c03313a0d4ad981e5 |
|
12 | 12 | # to have the dependencies for grey. |
|
13 | 13 | # |
|
14 | # black:command = python3.7 contrib/grey.py --quiet --skip-string-normalization - | |
|
14 | # black:command = python3.7 contrib/grey.py --quiet --config=black.toml --skip-string-normalization - | |
|
15 | 15 | # black:pattern = set:**.py - hgext/fsmonitor/pywatchman/** - mercurial/thirdparty/** - "contrib/python-zstandard/**" |
@@ -1,87 +1,87 | |||
|
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/grey.py it has no-che?k-code (glob) |
|
25 | 25 | Skipping contrib/packaging/hgpackaging/downloads.py it has no-che?k-code (glob) |
|
26 | 26 | Skipping contrib/packaging/hgpackaging/inno.py it has no-che?k-code (glob) |
|
27 | 27 | Skipping contrib/packaging/hgpackaging/py2exe.py it has no-che?k-code (glob) |
|
28 | 28 | Skipping contrib/packaging/hgpackaging/util.py it has no-che?k-code (glob) |
|
29 | 29 | Skipping contrib/packaging/hgpackaging/wix.py it has no-che?k-code (glob) |
|
30 | 30 | Skipping contrib/packaging/inno/build.py it has no-che?k-code (glob) |
|
31 | 31 | Skipping contrib/packaging/wix/build.py it has no-che?k-code (glob) |
|
32 | 32 | Skipping i18n/polib.py it has no-che?k-code (glob) |
|
33 | 33 | Skipping mercurial/statprof.py it has no-che?k-code (glob) |
|
34 | 34 | Skipping tests/badserverext.py it has no-che?k-code (glob) |
|
35 | 35 | |
|
36 | 36 | @commands in debugcommands.py should be in alphabetical order. |
|
37 | 37 | |
|
38 | 38 | >>> import re |
|
39 | 39 | >>> commands = [] |
|
40 | 40 | >>> with open('mercurial/debugcommands.py', 'rb') as fh: |
|
41 | 41 | ... for line in fh: |
|
42 | 42 | ... m = re.match(br"^@command\('([a-z]+)", line) |
|
43 | 43 | ... if m: |
|
44 | 44 | ... commands.append(m.group(1)) |
|
45 | 45 | >>> scommands = list(sorted(commands)) |
|
46 | 46 | >>> for i, command in enumerate(scommands): |
|
47 | 47 | ... if command != commands[i]: |
|
48 | 48 | ... print('commands in debugcommands.py not sorted; first differing ' |
|
49 | 49 | ... 'command is %s; expected %s' % (commands[i], command)) |
|
50 | 50 | ... break |
|
51 | 51 | |
|
52 | 52 | Prevent adding new files in the root directory accidentally. |
|
53 | 53 | |
|
54 | 54 | $ testrepohg files 'glob:*' |
|
55 | 55 | .arcconfig |
|
56 | 56 | .clang-format |
|
57 | 57 | .editorconfig |
|
58 | 58 | .hgignore |
|
59 | 59 | .hgsigs |
|
60 | 60 | .hgtags |
|
61 | 61 | .jshintrc |
|
62 | 62 | CONTRIBUTING |
|
63 | 63 | CONTRIBUTORS |
|
64 | 64 | COPYING |
|
65 | 65 | Makefile |
|
66 | 66 | README.rst |
|
67 | black.toml | |
|
67 | 68 | hg |
|
68 | 69 | hgeditor |
|
69 | 70 | hgweb.cgi |
|
70 | pyproject.toml | |
|
71 | 71 | setup.py |
|
72 | 72 | |
|
73 | 73 | Prevent adding modules which could be shadowed by ancient .so/.dylib. |
|
74 | 74 | |
|
75 | 75 | $ testrepohg files \ |
|
76 | 76 | > mercurial/base85.py \ |
|
77 | 77 | > mercurial/bdiff.py \ |
|
78 | 78 | > mercurial/diffhelpers.py \ |
|
79 | 79 | > mercurial/mpatch.py \ |
|
80 | 80 | > mercurial/osutil.py \ |
|
81 | 81 | > mercurial/parsers.py \ |
|
82 | 82 | > mercurial/zstd.py |
|
83 | 83 | [1] |
|
84 | 84 | |
|
85 | 85 | Keep python3 tests sorted: |
|
86 | 86 | $ sort < contrib/python3-whitelist > $TESTTMP/py3sorted |
|
87 | 87 | $ 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