templater: switch 'revcache' based on new mapping items
It was pretty easy to leave a stale 'revcache' when switching 'ctx'.
Let's make it be automatically replaced.
templater: add hook point to populate additional mapping items
The 'revcache' dict will be inserted by this hook.
context: skip path conflicts by default when clearing unknown file (
issue5776)
Prior to adding path conflict checking in
989e884d1be9, the test-audit-path.t
tests failed as shown here (but it was globbed away).
989e884d1be9 made it fail
with a message about the destination manifest containing a conflict (though the
no-symlink case wasn't updated). When the path conflict checking was gated
behind an experimental config in
2a774cae3a03^::
2a774cae3a03, the update started
erroneously succeeding here. It turns out that the child of
989e884d1be9 is the
origin of this change when path conflict checking is disabled, as shown by
grafting the experimental config range on top of it.
What's happening here is merge.batchget() is writing the symlink 'back' to wdir
(but as a regular file for the no-symlink case), and then tries to write
'back/test', but calls wctx['back/test'].clearunknown() first. The code that's
gated here was removing the newly written 'back' file, allowing 'back/test' to
succeed. I tried checking for the dir components of 'back/test' in dirstate,
and skipping removal if present. But that didn't work because the dirstate
isn't updated after each file is written out.
This is the last persistent test failure on Windows, so the testbot should start
turning green now. \o/
url: make logginghttphandler compatible with Python 2.7.6
There wasn't a usable hook point in httplib, so we have to replace connect()
to wrap the socket before self._tunnel().
util: make safehasattr() a pycompat function
So safehasattr() can be imported by utils.* modules. util.safehasattr() still
remains as an alias since it is pretty basic utility available for years.
On current Python 3, the builtin hasattr() should have no problem.
util: drop util.Abort in favor of error.Abort (API)
IIRC, error.Abort exists since Mercurial 1.2, so it should be pretty easy
for extensions authors to update their code.
.. api::
The util.Abort alias has been removed. Use error.Abort.
rcutil: directly call win32.executablepath()
Since it isn't supported on POSIX platform, we don't need to double the
compatibility layers.
directaccess: do not abort by 'ff...' hash
Since the 'ff...' hash should never be hidden, we can just ignore it.