context: reimplement memfilectx.cmp()
If I added a sanity check to basefilectx, test-context.py exploded. This
patch copies the naive implementation from overlayworkingfilectx.
rust-cpython: build and support for Python3
Defined Cargo features for Python3, making them overall simpler to
use, hooked them in build and made mercurial.rustext importable.
This is tested with Python 3.6.7.
Differential Revision: https://phab.mercurial-scm.org/D5446
py3: convert popen() command arguments in hgclient to str on Windows
This fixes test-commandserver.t and test-keyword.t, which was previously
complaining
TypeError("a bytes-like object is required, not 'str'")
py3: byteify the fakeversion extension in test-http-bad-server.t
# skip-blame for b'' prefixing
py3: spawn all python instances with legacy stdio enabled on Windows
This fixes 6 more tests. See
ef7119cd4965.
setup: avoid attempting to invoke the system-wide hg.exe on Windows
On Windows, the executable in the current directory gets priority over anything
in $PATH (both for cmd.exe and MSYS). That means, the former code was launching
the local hg.exe instead of the system-wide one, if it was previously built. If
that failed, it then fell back to the local hg code, but run through python.exe.
I'm not sure what it is about
ef7119cd4965, but that started throwing up a
messagebox that python37.dll couldn't be loaded. (And indeed, python37 is not
in $PATH by default.) Invoking the local hg via the current python avoids that.
delta: ignore base whose chains already don't match expectations
If we know the existing chain does not match our criteria, there is no point
to build a delta to append. This is especially useful when dealing with a full
text much smaller than its parent. In that case, the parent chain is probably
already too large.
example affected manifest write
before: 1.421005s
after: 0.815520s (-42%)