context: skip path conflicts by default when clearing unknown file (issue5776)

Authored by mharbison72.


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/


mharbison72Mar 24 2018, 1:30 AM
rHG9e6d3465f17e: url: make logginghttphandler compatible with Python 2.7.6