transaction: actually use tr.hookargs in pretxnclose
The 'tr.hookargs' is a dictionary containing all the arguments to be passed to
hooks. It is actually used for hooks now...
bundle2: use unbundle source as transaction name
This is what a bundle 1 push is doing. This got caught by trying to run the
whole test-suite using bundle2 for exchanges.
tags: have a different cache file per filter level
Currently whichever filter level asks for tags last will write the data on disk.
This create massive issues when tags are read for "visible" and "unfiltered"
on large and multi headed repository (like Mozilla central). See
issue4550 for
details
Each filter level recomputes its own cache without direct collaboration but they
all share the same 'hgtagsfnodes' cache. And that is where most of the time is
spent.
parsers: when available, use a presized dictionary for the file foldmap
On a repo with over 300,000 files, this speeds up perffilefoldmap:
before: wall 0.178421 comb 0.180000 user 0.160000 sys 0.020000 (best of 55)
after: wall 0.164462 comb 0.160000 user 0.140000 sys 0.020000 (best of 59)
tags: extract .hgtags filenodes cache to a standalone file
Resolution of .hgtags filenodes values has historically been a
performance pain point for large repositories, where reading individual
manifests can take over 100ms. Multiplied by hundreds or even thousands
of heads and resolving .hgtags filenodes becomes a performance issue.
This patch establishes a standalone cache file holding the .hgtags
filenodes for each changeset. After this patch, the .hgtags filenode
for any particular changeset should only have to be computed once
during the lifetime of the repository.
The introduced hgtagsfnodes1 cache file is modeled after the rev branch
cache: the cache is effectively an array of entries consisting of a
changeset fragment and the filenode for a revision. The file grows in
proportion to the length of the repository (24 bytes per changeset) and
is truncated when the repository is stripped. The file is not written
unless tag info is requested and tags have changed since last time.
This patch partially addresses
issue4550. Future patches will split the
"tags" cache file into per-filter files and will refactor the cache
format to not capture the .hgtags fnodes, as these are now stored in
the hgtagsfnodes1 cache. This patch is capable of standing alone. We
should not have to wait on the tags cache filter split and format
refactor for this patch to land.
extensions: extract partial application into a bind() function
We use partial function application for wrapping existing Mercurial functions,
and it's implemented separately each time. This patch extracts the partial
application into a new bind() function that can be used on its own by extensions
when appropriate.
In particular, the evolve extension needs to wrap functions in the various
bundle2 processing dictionaries, which the pre-existing methods don't support.
obsolete: experimental flag to get debug about obsmarkers exchange
The obsolescence markers exchange is still experimental. We (developer) need
more information about what is going on. I'm adding an experimental flag to add
display the amount of data exchanged during bundle2 exchanges.