py3: make tests/svn-safe-append.py compatible with python 3
Differential Revision: https://phab.mercurial-scm.org/D4671
py3: use print as a function in tests/test-subrepo-svn.t
Differential Revision: https://phab.mercurial-scm.org/D4670
bundle2: make server.bundle2.stream default to True
Support for bundle2 streaming clones has been shipped in Mercurial 4.5
(
7eedbd5d4880), but was never activated by default. It's time to have more
people use it. The new format allows streaming clones to transport cache
(hooray for speed) and phaseroots (fixes phase-related issues).
Changes in tests:
bundle2 capabilities now have "stream=v2" (plus a '\n' as a separator) and
therefore take 14 bytes more: "%0Astream%3Dv2". Tip for tests that have data
encoded with CBOR: 0xd3 - 0xc5 = 14.
$USUAL_BUNDLE2_CAPS$ replaces $USUAL_BUNDLE2_CAPS_SERVER$, which is the same
thing, but without "stream=v2".
Since streaming clones now also transfer caches, the reported byte and file
counts are higher (e.g. 816 bytes in 9 files instead of 613 bytes in 4 files,
a bit of --debug and manual math confirms that the caches take these extra 203
bytes in 5 files).
Differential Revision: https://phab.mercurial-scm.org/D4680
bundle2: graduate bundle2.stream option from experimental to server section
Differential Revision: https://phab.mercurial-scm.org/D4679
tests: split capabilities into separate lines while searching for "narrow"
This test is interested only in capabilities that are related to narrow, so
let's omit everything else. Makes it easier to update other capabilities (and
"rev-branch-cache" is one of the usual patterns that are already present in
tests/common-patterns.py anyway).
Differential Revision: https://phab.mercurial-scm.org/D4678
py3: resolve Unicode issues around `hg serve` on Windows
Presumably we're going to want to use CreateProcessW(), and possibly get rid of
pycompat.getcwd() here (which maps to the DeprecationWarning causing
os.getcwdb()) to use os.getcwd() directly. But this was a minimal change to
get rid of some stacktraces in test-run-tests.t.
run-tests: avoid os.getcwdb() on Windows
Any call to this issues a DeprecationWarning about the Windows bytes API being
deprecated. There are a handful of these calls in core, but test-run-tests.t
was littered with these, as it's printed everytime run-tests.py is launched.
I'm not sure what the long term strategy for Unicode on Windows in the test
runner is, but this seems no worse than the current conversion strategy.
run-tests: quote PYTHON when spawning a subprocess
Same reason as
5abc47d4ca6b. This covers running *.py tests, as well as inline
python blocks. I didn't hit the path around line 3079, but it seems correct to
quote.