tests: handle deleted .hg directory (git 2.2.0 and higher) (
issue4585)
In git 2.2.0 and higher, removing files and directories is changed:
removing an object that does not exist returns success rather than failure.
As a result, even though .hg/hgrc does not exist, success is returned
and the .hg/ directory is removed.
To handle this correctly, use 'rm -rf' to allow successful removing
for all git versions.
The exact changeset where this was introduced in git:
1054af7d04aef64378d69a0496b45cdbf6a0bef2
wrapper.c: remove/unlink_or_warn: simplify, treat ENOENT as success
hgweb: resurrect <span> tag on diffline to fix rendering in monoblue style
It was removed at
606a3bf82e30 as a useless tag, but it is necessary to
apply "div.diff pre span" style.
http://selenic.com/repo/hg/rev/
606a3bf82e30?style=monoblue
encoding: use parsers.asciiupper when available
This is used on Windows and Cygwin, and the gains from this are expected to be
similar to what was seen in
80f2b63dd83a.
parsers: make _asciilower a generic _asciitransform function
We can now pass in whatever table we like. For example, an upcoming patch will
introduce asciiupper.
parsers._asciilower: use an explicit return object
No functional change, but this will make upcoming patches cleaner.
parsers: factor out most of asciilower into an internal function
We're going to reuse this in upcoming patches.
The change to Py_ssize_t is necessary because parsers.c doesn't define
PY_SSIZE_T_CLEAN. That macro changes the behavior of PyArg_ParseTuple but not
PyBytes_GET_SIZE.
manifestv2: add support for writing new manifest format
If .hg/requires has 'manifestv2', the manifest will be written using
the new format.
manifestv2: add support for reading new manifest format
The new manifest format is designed to be smaller, in particular to
produce smaller deltas. It stores hashes in binary and puts the hash
on a new line (for smaller deltas). It also uses stem compression to
save space for long paths. The format has room for metadata, but
that's there only for future-proofing. The parser thus accepts any
metadata and throws it away. For more information, see
http://mercurial.selenic.com/wiki/ManifestV2Plan.
The current manifest format doesn't allow an empty filename, so we use
an empty filename on the first line to tell a manifest of the new
format from the old. Since we still never write manifests in the new
format, the added code is unused, but it is tested by
test-manifest.py.