##// END OF EJS Templates
check-code: detect r.revision(r.node(rev))...
Jun Wu -
r31721:be8a866a default
parent child Browse files
Show More
@@ -337,6 +337,8 b' pypats = ['
337 (r'^import httplib', "don't use httplib, use util.httplib"),
337 (r'^import httplib', "don't use httplib, use util.httplib"),
338 (r'^import BaseHTTPServer', "use util.httpserver instead"),
338 (r'^import BaseHTTPServer', "use util.httpserver instead"),
339 (r'\.next\(\)', "don't use .next(), use next(...)"),
339 (r'\.next\(\)', "don't use .next(), use next(...)"),
340 (r'([a-z]*).revision\(\1\.node\(',
341 "don't covert rev to node before passing to revision(nodeorrev)"),
340
342
341 # rules depending on implementation of repquote()
343 # rules depending on implementation of repquote()
342 (r' x+[xpqo%APM][\'"]\n\s+[\'"]x',
344 (r' x+[xpqo%APM][\'"]\n\s+[\'"]x',
@@ -9,7 +9,16 b' New errors are not allowed. Warnings are'
9
9
10 $ hg locate -X contrib/python-zstandard -X hgext/fsmonitor/pywatchman |
10 $ hg locate -X contrib/python-zstandard -X hgext/fsmonitor/pywatchman |
11 > sed 's-\\-/-g' | xargs "$check_code" --warnings --per-file=0 || false
11 > sed 's-\\-/-g' | xargs "$check_code" --warnings --per-file=0 || false
12 contrib/perf.py:859:
13 > r.revision(r.node(x))
14 don't covert rev to node before passing to revision(nodeorrev)
12 Skipping i18n/polib.py it has no-che?k-code (glob)
15 Skipping i18n/polib.py it has no-che?k-code (glob)
16 mercurial/bundlerepo.py:117:
17 > return mdiff.textdiff(self.revision(self.node(rev1)),
18 don't covert rev to node before passing to revision(nodeorrev)
19 mercurial/bundlerepo.py:118:
20 > self.revision(self.node(rev2)))
21 don't covert rev to node before passing to revision(nodeorrev)
13 mercurial/demandimport.py:312:
22 mercurial/demandimport.py:312:
14 > if os.environ.get('HGDEMANDIMPORT') != 'disable':
23 > if os.environ.get('HGDEMANDIMPORT') != 'disable':
15 use encoding.environ instead (py3)
24 use encoding.environ instead (py3)
@@ -36,7 +45,22 b' New errors are not allowed. Warnings are'
36 mercurial/policy.py:49:
45 mercurial/policy.py:49:
37 > policy = os.environ.get('HGMODULEPOLICY', policy)
46 > policy = os.environ.get('HGMODULEPOLICY', policy)
38 use encoding.environ instead (py3)
47 use encoding.environ instead (py3)
48 mercurial/revlog.py:441:
49 > t = self.revision(self.node(rev))
50 don't covert rev to node before passing to revision(nodeorrev)
51 mercurial/revlog.py:1599:
52 > basetext = self.revision(self.node(baserev), _df=fh, raw=raw)
53 don't covert rev to node before passing to revision(nodeorrev)
54 mercurial/revlog.py:1631:
55 > ptext = self.revision(self.node(rev), _df=fh)
56 don't covert rev to node before passing to revision(nodeorrev)
39 Skipping mercurial/statprof.py it has no-che?k-code (glob)
57 Skipping mercurial/statprof.py it has no-che?k-code (glob)
58 mercurial/unionrepo.py:93:
59 > return mdiff.textdiff(self.revision(self.node(rev1)),
60 don't covert rev to node before passing to revision(nodeorrev)
61 mercurial/unionrepo.py:94:
62 > self.revision(self.node(rev2)))
63 don't covert rev to node before passing to revision(nodeorrev)
40 [1]
64 [1]
41
65
42 @commands in debugcommands.py should be in alphabetical order.
66 @commands in debugcommands.py should be in alphabetical order.
@@ -165,3 +165,7 b' Check perf.py for historical portability'
165 $ (hg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py;
165 $ (hg files -r 1.2 glob:mercurial/*.c glob:mercurial/*.py;
166 > hg files -r tip glob:mercurial/*.c glob:mercurial/*.py) |
166 > hg files -r tip glob:mercurial/*.c glob:mercurial/*.py) |
167 > "$TESTDIR"/check-perf-code.py contrib/perf.py
167 > "$TESTDIR"/check-perf-code.py contrib/perf.py
168 contrib/perf.py:859:
169 > r.revision(r.node(x))
170 don't covert rev to node before passing to revision(nodeorrev)
171 [1]
General Comments 0
You need to be logged in to leave comments. Login now