templatekw: add option to include ignored/clean/unknown files in cache
They will be necessary to provide {status} of files.
templatekw: keep status tuple in cache dict and rename cache key accordingly
There's no point to drop tail elements, which are mostly empty lists.
py3: use sysstr() to convert ProgrammingError bytes with no unicode error risk
msg.decode('utf8') may fail if msg isn't an ASCII string, and that's possible
as we sometimes embed a filename in the error message for example.
revlog: reuse cached delta for identical base revision (
issue5975)
Since
8f83a953dddf, we skip over empty deltas when choosing a delta base. Such
delta happens when two distinct revisions have the same content.
The remote might be sending a delta against such revision within the bundle.
In that case, the delta base is no longer considered, but the cached one could
still, be used with the equivalent revision.
Not reusing the delta from the bundle can have a significant performance
impact, so we now make sure with doing so when possible.
snapshot: fix line order when skipping over empty deltas
The code movement in
37957e07138c introduced an error.
Since
8f83a953dddf, we discarded some revisions because they are identical to
their delta base (and use that delta base instead). That logic is good,
however, in
37957e07138c we mixed up the order of two line, adding the "new"
revision to the set of already tested one, instead of the discarded one. So in
practice, we were never investigating any revisions in a chain starting with
an empty delta. Creating significantly worst delta chain (eg: Mercurial's
manifest move goes from about 60MB up to about 80MB).
tests: stabilize change for handling not quoting non-empty-directory
The change originated in
cb1329738d64. I suspect the problem is with the
combination of (re) and the '\' to '/' retry on Windows. I've no idea if py3 on
Windows needs the quoting, since it can't even run `hg` with no arguments.
(It's dying somewhere on the ctype declarations when win32.py is imported.)
hg: wrap the highest layer in the `hg` script possible in trace event
This should help us have a better idea of what "interpreter startup
costs" look like. This does omit the HGUNICODEPEDANTRY block and the
LIBDIR dancing to set up sys.path, but the former is usually off and
the latter is unavoidable and should be very fast. If we get worried
about those cases we can consider open-coding the tracing logic here.
Differential Revision: https://phab.mercurial-scm.org/D4346