Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:56 +0400] rev 19722
hgweb: add revset syntax support to search
This mode is used when all the conditions are met:
- 'reverse(%s)' % query string can be parsed to a revset tree
- this tree has depth more than two, i.e. the query has some part of
revset syntax used
- the repo can be actually matched against this tree, i.e. it has only existent
function/operators and revisions/tags/bookmarks specified are correct
- no revset regexes are used in the query (strings which start with 're:')
- only functions explicitly marked as safe in revset.py are used in the query
Add several new tests for different parsing conditions and exception handling.
Alexander Plavin <alexander@plav.in> [Fri, 06 Sep 2013 13:30:56 +0400] rev 19721
revset: add a whitelist of DoS-safe symbols
'Safe' here means that they can't be used for a DoS attack for any given input.
Alexander Plavin <alexander@plav.in> [Wed, 07 Aug 2013 01:21:31 +0400] rev 19720
revset: add helper function to get functions used in a revset parse tree
Will be used to determine whether all functions used in a hgweb search query
are allowed there.
Alexander Plavin <alexander@plav.in> [Fri, 09 Aug 2013 22:52:58 +0400] rev 19719
revset: add helper function to get revset parse tree depth
Will be used to determine if a hgweb search query actually uses
any revset syntax.
Siddharth Agarwal <sid0@fb.com> [Sat, 07 Sep 2013 00:59:24 -0700] rev 19718
parsers: use a lookup table to convert hex to binary
This is a hotspot for parse_manifest. With this patch, for a 20 MB, 200,000
file manifest, parse_manifest goes down from 0.153 seconds to 0.116.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 23:05:33 -0700] rev 19717
revlog: remove _chunkbase since it is no longer used
This was introduced in 2011 for the lwcopy feature but never actually got used.
A similar hook can easily be reintroduced if needed in the future.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 23:05:11 -0700] rev 19716
revlog: move chunk cache preload from revision to _chunks
In case we don't have a cached text already, add the base rev to the list
passed to _chunks. In the cached case this also avoids unnecessarily preloading
the chunk for the cached rev.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 22:57:51 -0700] rev 19715
revlog._chunks: inline getchunk
We do this in a somewhat hacky way, relying on the fact that our sole caller
preloads the cache right before calling us. An upcoming patch will make this
more sensible.
For a 20 MB manifest with a delta chain of > 40k, perfmanifest goes from 0.49
seconds to 0.46.
Siddharth Agarwal <sid0@fb.com> [Sat, 07 Sep 2013 12:42:46 -0700] rev 19714
revlog.revision: fix cache preload for inline revlogs
Previously the length of data preloaded did not account for the interleaved io
contents. This meant that we'd sometimes have cache misses in _chunks despite
the preloading.
Having a correctly filled out cache will become essential in an upcoming patch.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 16:31:35 -0700] rev 19713
revlog: add a fast method for getting a list of chunks
This moves _chunkraw into the loop. Doing that improves revlog decompression --
in particular, manifest decompression -- significantly. For a 20 MB manifest
which is the result of a > 40k delta chain, hg perfmanifest improves from 0.55
seconds to 0.49 seconds.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 13:35:29 -0700] rev 19712
perfmanifest: allow and require passing in a rev
Previously perfmanifest would only test tip.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 13:20:07 -0700] rev 19711
perfmanifest: fix cache invalidation
The manifest cache is now stored in _mancache. The revlog cache is still stored
in _cache.
Siddharth Agarwal <sid0@fb.com> [Fri, 06 Sep 2013 13:16:21 -0700] rev 19710
lrucachedict: implement clear()
Kevin Bullock <kbullock@ringworld.org> [Sat, 07 Sep 2013 16:08:11 -0500] rev 19709
merge with stable
Antoine Pitrou <solipsis@pitrou.net> [Sat, 07 Sep 2013 21:20:00 +0200] rev 19708
bundle: fix performance regression when bundling file changes (
issue4031)
Somewhere before 2.7, a change [
ec896f9e8894] was committed that
entailed a large performance regression when bundling (and therefore
remote cloning) repositories. For each file in the repository, it would
recompute the set of needed changesets even though it is the same for
all files. This computation would dominate bundle runtimes according to
profiler output (by 10x or more).
Kevin Bullock <kbullock@ringworld.org> [Sat, 07 Sep 2013 00:08:36 -0500] rev 19707
merge with stable
Alexander Plavin <alexander@plav.in> [Tue, 06 Aug 2013 00:52:06 +0400] rev 19706
revset: fix wrong keyword() behaviour for strings with spaces
Some changesets can be wrongly reported as matched by this predicate
due to searching in a string joined with spaces and not individually.
A test case added, which fails without this fix.
Sean Farley <sean.michael.farley@gmail.com> [Thu, 15 Aug 2013 13:42:56 -0500] rev 19705
commitablefilectx: move children from workingfilectx
Sean Farley <sean.michael.farley@gmail.com> [Thu, 15 Aug 2013 13:42:33 -0500] rev 19704
commitablefilectx: move parents from workingfilectx
Sean Farley <sean.michael.farley@gmail.com> [Thu, 15 Aug 2013 13:23:06 -0500] rev 19703
commitablefilectx: move __nonzero__ from workingfilectx
Sean Farley <sean.michael.farley@gmail.com> [Thu, 15 Aug 2013 13:12:50 -0500] rev 19702
commitablefilectx: move __init__ from workingfilectx
Sean Farley <sean.michael.farley@gmail.com> [Thu, 15 Aug 2013 13:11:51 -0500] rev 19701
commitablefilectx: add a class that will be used for mutable file contexts
Just like commitablectx, this will serve as a common place for code that will
be shared between workingfilectx and memfilectx.
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:40:34 -0500] rev 19700
commitablectx: move dirs from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:40:27 -0500] rev 19699
commitablectx: move markcommitted from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:37:59 -0500] rev 19698
commitablectx: move ancestors from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:37:11 -0500] rev 19697
commitablectx: move walk from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:37:01 -0500] rev 19696
commitablectx: move ancestor from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:25:43 -0500] rev 19695
commitablectx: move flags from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:25:26 -0500] rev 19694
commitablectx: move children from workingctx
Sean Farley <sean.michael.farley@gmail.com> [Wed, 14 Aug 2013 16:25:17 -0500] rev 19693
commitablectx: move hidden from workingctx