Show More
@@ -7,7 +7,7 b' def lowerwrap(scope, funcname):' | |||||
7 | d, base = os.path.split(fname) |
|
7 | d, base = os.path.split(fname) | |
8 | try: |
|
8 | try: | |
9 | files = os.listdir(d or '.') |
|
9 | files = os.listdir(d or '.') | |
10 |
except OSError |
|
10 | except OSError: | |
11 | files = [] |
|
11 | files = [] | |
12 | if base in files: |
|
12 | if base in files: | |
13 | return f(fname, *args, **kwargs) |
|
13 | return f(fname, *args, **kwargs) |
@@ -337,13 +337,12 b' def _preparepats():' | |||||
337 | for pats in failandwarn: |
|
337 | for pats in failandwarn: | |
338 | for i, pseq in enumerate(pats): |
|
338 | for i, pseq in enumerate(pats): | |
339 | # fix-up regexes for multi-line searches |
|
339 | # fix-up regexes for multi-line searches | |
340 |
|
|
340 | p = pseq[0] | |
341 | # \s doesn't match \n |
|
341 | # \s doesn't match \n | |
342 | p = re.sub(r'(?<!\\)\\s', r'[ \\t]', p) |
|
342 | p = re.sub(r'(?<!\\)\\s', r'[ \\t]', p) | |
343 | # [^...] doesn't match newline |
|
343 | # [^...] doesn't match newline | |
344 | p = re.sub(r'(?<!\\)\[\^', r'[^\\n', p) |
|
344 | p = re.sub(r'(?<!\\)\[\^', r'[^\\n', p) | |
345 |
|
345 | |||
346 | #print po, '=>', p |
|
|||
347 | pats[i] = (re.compile(p, re.MULTILINE),) + pseq[1:] |
|
346 | pats[i] = (re.compile(p, re.MULTILINE),) + pseq[1:] | |
348 | filters = c[2] |
|
347 | filters = c[2] | |
349 | for i, flt in enumerate(filters): |
|
348 | for i, flt in enumerate(filters): |
@@ -48,7 +48,6 b' def build_pattern(mapping=MAPPING):' | |||||
48 | mod_list = ' | '.join(["'%s' '.' ('%s')" % |
|
48 | mod_list = ' | '.join(["'%s' '.' ('%s')" % | |
49 | (key, "' | '".join(packages[key])) for key in packages]) |
|
49 | (key, "' | '".join(packages[key])) for key in packages]) | |
50 | mod_list = '(' + mod_list + ' )' |
|
50 | mod_list = '(' + mod_list + ' )' | |
51 | bare_names = alternates(mapping.keys()) |
|
|||
52 |
|
51 | |||
53 | yield """name_import=import_name< 'import' module_name=dotted_name< %s > > |
|
52 | yield """name_import=import_name< 'import' module_name=dotted_name< %s > > | |
54 | """ % mod_list |
|
53 | """ % mod_list |
@@ -175,7 +175,7 b' def perfpathcopies(ui, repo, rev1, rev2)' | |||||
175 | def perfmanifest(ui, repo): |
|
175 | def perfmanifest(ui, repo): | |
176 | def d(): |
|
176 | def d(): | |
177 | t = repo.manifest.tip() |
|
177 | t = repo.manifest.tip() | |
178 |
|
|
178 | repo.manifest.read(t) | |
179 | repo.manifest.mapcache = None |
|
179 | repo.manifest.mapcache = None | |
180 | repo.manifest._cache = None |
|
180 | repo.manifest._cache = None | |
181 | timer(d) |
|
181 | timer(d) | |
@@ -184,7 +184,7 b' def perfmanifest(ui, repo):' | |||||
184 | def perfchangeset(ui, repo, rev): |
|
184 | def perfchangeset(ui, repo, rev): | |
185 | n = repo[rev].node() |
|
185 | n = repo[rev].node() | |
186 | def d(): |
|
186 | def d(): | |
187 |
|
|
187 | repo.changelog.read(n) | |
188 | #repo.changelog._cache = None |
|
188 | #repo.changelog._cache = None | |
189 | timer(d) |
|
189 | timer(d) | |
190 |
|
190 |
@@ -3,7 +3,7 b'' | |||||
3 | from mercurial import demandimport |
|
3 | from mercurial import demandimport | |
4 | demandimport.enable() |
|
4 | demandimport.enable() | |
5 |
|
5 | |||
6 |
import |
|
6 | import sys | |
7 | from mercurial.i18n import _ |
|
7 | from mercurial.i18n import _ | |
8 | from mercurial import simplemerge, fancyopts, util, ui |
|
8 | from mercurial import simplemerge, fancyopts, util, ui | |
9 |
|
9 |
@@ -981,7 +981,6 b' class Translator(nodes.NodeVisitor):' | |||||
981 | # Level is too low to display: |
|
981 | # Level is too low to display: | |
982 | # raise nodes.SkipNode |
|
982 | # raise nodes.SkipNode | |
983 | attr = {} |
|
983 | attr = {} | |
984 | backref_text = '' |
|
|||
985 | if node.hasattr('id'): |
|
984 | if node.hasattr('id'): | |
986 | attr['name'] = node['id'] |
|
985 | attr['name'] = node['id'] | |
987 | if node.hasattr('line'): |
|
986 | if node.hasattr('line'): |
@@ -105,7 +105,7 b' def has_inotify():' | |||||
105 | sock = socket.socket(socket.AF_UNIX) |
|
105 | sock = socket.socket(socket.AF_UNIX) | |
106 | try: |
|
106 | try: | |
107 | sock.bind(name) |
|
107 | sock.bind(name) | |
108 |
except socket.error |
|
108 | except socket.error: | |
109 | return False |
|
109 | return False | |
110 | sock.close() |
|
110 | sock.close() | |
111 | os.unlink(name) |
|
111 | os.unlink(name) |
@@ -5,7 +5,6 b' run pyflakes on all tracked files ending' | |||||
5 | (skipping binary file random-seed) |
|
5 | (skipping binary file random-seed) | |
6 | $ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \ |
|
6 | $ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \ | |
7 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
7 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" | |
8 | contrib/simplemerge:*: 'os' imported but unused (glob) |
|
|||
9 | contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob) |
|
8 | contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob) | |
10 | setup.py:*: 'sha' imported but unused (glob) |
|
9 | setup.py:*: 'sha' imported but unused (glob) | |
11 | setup.py:*: 'zlib' imported but unused (glob) |
|
10 | setup.py:*: 'zlib' imported but unused (glob) | |
@@ -16,14 +15,6 b' run pyflakes on all tracked files ending' | |||||
16 | tests/hghave.py:*: 'publish_cmdline' imported but unused (glob) |
|
15 | tests/hghave.py:*: 'publish_cmdline' imported but unused (glob) | |
17 | tests/hghave.py:*: 'pygments' imported but unused (glob) |
|
16 | tests/hghave.py:*: 'pygments' imported but unused (glob) | |
18 | tests/hghave.py:*: 'ssl' imported but unused (glob) |
|
17 | tests/hghave.py:*: 'ssl' imported but unused (glob) | |
19 | contrib/casesmash.py:*: local variable 'inst' is assigned to but never used (glob) |
|
|||
20 | contrib/check-code.py:*: local variable 'po' is assigned to but never used (glob) |
|
|||
21 | contrib/hgfixes/fix_leftover_imports.py:*: local variable 'bare_names' is assigned to but never used (glob) |
|
|||
22 | contrib/perf.py:*: local variable 'm' is assigned to but never used (glob) |
|
|||
23 | contrib/perf.py:*: local variable 'c' is assigned to but never used (glob) |
|
|||
24 | doc/hgmanpage.py:*: local variable 'backref_text' is assigned to but never used (glob) |
|
|||
25 | tests/hghave.py:*: local variable 'err' is assigned to but never used (glob) |
|
|||
26 | tests/test-hgweb-auth.py:*: local variable 'e' is assigned to but never used (glob) |
|
|||
27 | contrib/win32/hgwebdir_wsgi.py:*: 'from isapi.install import *' used; unable to detect undefined names (glob) |
|
18 | contrib/win32/hgwebdir_wsgi.py:*: 'from isapi.install import *' used; unable to detect undefined names (glob) | |
28 | hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) |
|
19 | hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) | |
29 |
|
20 |
@@ -41,7 +41,7 b' def test(auth, urls=None):' | |||||
41 | if authinfo is not None: |
|
41 | if authinfo is not None: | |
42 | pm.add_password(*authinfo) |
|
42 | pm.add_password(*authinfo) | |
43 | print ' ', pm.find_user_password('test', u) |
|
43 | print ' ', pm.find_user_password('test', u) | |
44 |
except Abort |
|
44 | except Abort: | |
45 | print 'abort' |
|
45 | print 'abort' | |
46 |
|
46 | |||
47 | if not urls: |
|
47 | if not urls: |
General Comments 0
You need to be logged in to leave comments.
Login now