##// END OF EJS Templates
spanset: directly use __contains__ instead of a lambda...
spanset: directly use __contains__ instead of a lambda Spanset are massively used in revset. First because the initial subset itself is a repo wide spanset. We speed up the __and__ operation by getting rid of a gratuitous lambda call. A more long terms solution would be to: 1. speed up operation between spansets, 2. have a special smartset for `all` revisions. In the mean time, this is a very simple fix that buyback some of the performance regression. Below is performance benchmark for trival `and` operation between two spansets. (Run on an unspecified fairly large repository.) revset tip:0 2.9.2) wall 0.282543 comb 0.280000 user 0.260000 sys 0.020000 (best of 35) before) wall 0.819181 comb 0.820000 user 0.820000 sys 0.000000 (best of 12) after) wall 0.645358 comb 0.650000 user 0.650000 sys 0.000000 (best of 16) Proof of concept implementation of an `all` smartset brings this to 0.10 but it's too invasive for stable.

File last commit:

r20644:779ceb84 default
r21207:b9defeeb stable
Show More
test-check-pyflakes.t
19 lines | 949 B | text/troff | Tads3Lexer
/ tests / test-check-pyflakes.t
timeless
tests: add pyflakes checking for unused imports
r14140 $ "$TESTDIR/hghave" pyflakes || exit 80
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ cd "`dirname "$TESTDIR"`"
Simon Heimberg
tests: run pyflakes on files from manifest which could be python files...
r19377
run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)
$ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
setup.py:*: 'sha' imported but unused (glob)
setup.py:*: 'zlib' imported but unused (glob)
setup.py:*: 'bz2' imported but unused (glob)
setup.py:*: 'py2exe' imported but unused (glob)
tests/hghave.py:*: '_lsprof' imported but unused (glob)
tests/hghave.py:*: 'publish_cmdline' imported but unused (glob)
tests/hghave.py:*: 'pygments' imported but unused (glob)
tests/hghave.py:*: 'ssl' imported but unused (glob)
Matt Mackall
tests: fix unused imports from inotify removal caught by pyflakes
r20644 contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
timeless
tests: add pyflakes checking for unused imports
r14140