Show More
@@ -31,7 +31,7 b" headermatch = re.compile(r'''\\n*(.+)\\n([" | |||||
31 |
|
31 | |||
32 |
|
32 | |||
33 | def main(): |
|
33 | def main(): | |
34 |
filenames = subprocess.check_output(['hg', ' |
|
34 | filenames = subprocess.check_output(['hg', 'files', 'set:**.rst+kallithea/i18n/how_to']).splitlines() | |
35 | for fn in filenames: |
|
35 | for fn in filenames: | |
36 | fn = fn.decode() |
|
36 | fn = fn.decode() | |
37 | print('processing %s' % fn) |
|
37 | print('processing %s' % fn) |
@@ -40,7 +40,7 b" if __name__ == '__main__':" | |||||
40 | if len(sys.argv) < 2: |
|
40 | if len(sys.argv) < 2: | |
41 | print('Cleanup of superfluous % formatting of log statements.') |
|
41 | print('Cleanup of superfluous % formatting of log statements.') | |
42 | print('Usage:') |
|
42 | print('Usage:') | |
43 |
print(''' hg revert `hg |
|
43 | print(''' hg revert `hg files 'set:**.py'|grep -v logformat.py` && scripts/logformat.py `hg files 'set:**.py'` && hg diff''') | |
44 | raise SystemExit(1) |
|
44 | raise SystemExit(1) | |
45 |
|
45 | |||
46 | for f in sys.argv[1:]: |
|
46 | for f in sys.argv[1:]: |
@@ -9,5 +9,5 b' scripts/docs-headings.py' | |||||
9 | scripts/generate-ini.py |
|
9 | scripts/generate-ini.py | |
10 | scripts/whitespacecleanup.sh |
|
10 | scripts/whitespacecleanup.sh | |
11 |
|
11 | |||
12 |
hg |
|
12 | hg files 'set:!binary()&grep("^#!.*python")' 'set:**.py' | xargs scripts/pyflakes | |
13 | echo "no blocking problems found by $0" |
|
13 | echo "no blocking problems found by $0" |
@@ -2,7 +2,7 b'' | |||||
2 |
|
2 | |||
3 | # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes |
|
3 | # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes | |
4 |
|
4 | |||
5 |
files=`hg |
|
5 | files=`hg files | egrep -v '/fontello/|/templates/email/|(^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'` | |
6 |
|
6 | |||
7 | sed -i "s/`printf '\r'`//g" $files |
|
7 | sed -i "s/`printf '\r'`//g" $files | |
8 | sed -i -e "s,`printf '\t'`, ,g" $files |
|
8 | sed -i -e "s,`printf '\t'`, ,g" $files | |
@@ -11,14 +11,14 b" sed -i -e 's,\\([^ ]\\)\\\\$,\\1 \\\\,g' -e 's," | |||||
11 | # ensure one trailing newline - remove empty last line and make last line include trailing newline: |
|
11 | # ensure one trailing newline - remove empty last line and make last line include trailing newline: | |
12 | sed -i -e '$,${/^$/d}' -e '$a\' $files |
|
12 | sed -i -e '$,${/^$/d}' -e '$a\' $files | |
13 |
|
13 | |||
14 |
sed -i -e 's,\([^ /]\){,\1 {,g' `hg |
|
14 | sed -i -e 's,\([^ /]\){,\1 {,g' `hg files 'set:**.css'` | |
15 |
sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg |
|
15 | sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg files 'set:**.css'` | |
16 |
|
16 | |||
17 |
hg |
|
17 | hg files | xargs chmod -x | |
18 |
hg |
|
18 | hg files 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x | |
19 |
|
19 | |||
20 | # isort is installed from dev_requirements.txt |
|
20 | # isort is installed from dev_requirements.txt | |
21 |
hg |
|
21 | hg files 'set:!binary()&grep("^#!.*python")' 'set:**.py' | xargs isort --line-width 160 --lines-after-imports 2 | |
22 |
|
22 | |||
23 | echo "diff after $0:" |
|
23 | echo "diff after $0:" | |
24 | hg diff |
|
24 | hg diff |
General Comments 0
You need to be logged in to leave comments.
Login now