Yuya Nishihara <yuya@tcha.org> [Wed, 17 Feb 2016 21:38:25 +0900] rev 34044
revsetlang: build optimized tree by helper function
This should make optimize() more readable, but it doubles the parsing cost.
(original)
$ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \
'L.optimize(L.analyze(L.parse("::tip")))'
10000 loops, best of 3: 18.1 usec per loop
(this patch)
$ python -m timeit -n10000 -s 'from mercurial import revsetlang as L' \
'L._treecache.clear(); L.optimize(L.analyze(L.parse("::tip")))'
10000 loops, best of 3: 48.4 usec per loop
30usec isn't dominant compared to the revset evaluation, but that is a cost.
That's why a parsed tree is cached, which can benefit in hgweb or chg server.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Feb 2016 21:30:04 +0900] rev 34043
parser: add helper function that constructs parsed tree from template
This function will be used as follows:
build('only(_, _)', x, y)
See the next patch for details.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Aug 2017 18:19:14 +0530] rev 34042
patch: take messages out of the function so that extensions can add entries
Extensions will want to have interactive thing for more operations or
particulary want to show more verbs. So this patch takes out the message thing
from the function so that extensions can add verbs to this. The curses one is
also not in any function so extensions can add more actions and verbs there.
Differential Revision: https://phab.mercurial-scm.org/D567
Jun Wu <quark@fb.com> [Wed, 02 Aug 2017 21:24:29 -0700] rev 34041
run-tests: allow bisecting a different repo
Add `--bisect-repo` flag which accepts a different repo to bisect.
3rd party extensions may reuse `run-tests.py` from core to run tests. Test
failure could be caused by either a core hg change or the 3rd party
extension code itself. Having a way to specify which repo to bisect is
useful.
Differential Revision: https://phab.mercurial-scm.org/D578
Jun Wu <quark@fb.com> [Wed, 02 Aug 2017 21:01:38 -0700] rev 34040
run-tests: extract prefix of bisect commands to a variable
This does not change any logic.
Differential Revision: https://phab.mercurial-scm.org/D577
Jun Wu <quark@fb.com> [Wed, 02 Aug 2017 21:01:38 -0700] rev 34039
run-tests: pass --with-hg to run-tests.py command used by bisect
This makes `run-tests.py -l test-run-tests.t` 23 seconds faster on my
laptop. Inside the test, `$ rt --known-good-rev=0 test-bisect.t` took 24.9
seconds before, and 1.2 seconds after.
Differential Revision: https://phab.mercurial-scm.org/D576
Jun Wu <quark@fb.com> [Mon, 28 Aug 2017 13:43:25 -0700] rev 34038
import-checker: allow relative import a module being checked
This would make the checker more friendly for 3rd-party code. For example,
In remotefilelog/x.py, it may have:
from . import shallowutils
That could trigger "relative import of stdlib module" if
"remotefilelog" was installed in the system. If the module being checked
conflicts with the system module, it makes sense to not treat that module as
system module. This patch makes it so.
Differential Revision: https://phab.mercurial-scm.org/D552
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:28:59 -0700] rev 34037
merge: move some of the logic in batchget() to workingfilectx
We will use this logic in two places with in-memory merge.
Differential Revision: https://phab.mercurial-scm.org/D444
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:28:59 -0700] rev 34036
filemerge: add _restorebackup
Differential Revision: https://phab.mercurial-scm.org/D404
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:28:59 -0700] rev 34035
filemerge: reduce creation of tempfiles until needed
This restricts the creation of temporary files to just `_xmerge`, when we call
an external tool.
Differential Revision: https://phab.mercurial-scm.org/D403