phabricator: convert conduit response JSON unicode to bytes inside callconduit
Previously the byte conversion was happening piecemeal in callers, and in the
case of createdifferentialrevision not at all, leading to UnicodeEncodeErrors
when trying to phabsend a commit with a description containing characters not
representable in ascii. (
issue6040)
Remove all the scattered encoding.unitolocal calls and perform it once, inside
callconduit, on the entire response dict recursively before returning it, in
keeping with the strategy of converting at the earliest opportunity. Convert all
keys used on returned object to bytes.
Modify the phabsend tests to test this by adding a € to the commit message of
alpha.
Differential Revision: https://phab.mercurial-scm.org/D6044
transaction: include txnname in the hookargs dictionary
There is no reason to not include the txnname alongside the txnid in all case.
The python hooks already have them, so aligning the the shell hooks seems it
could be useful in the future.
(I don't have a strong opinion about this, we can also decide to never align the
python and shell hooks and this and I'll drop this patch).
discovery-helper: reflect argument value in the name of the results
It is common to create multiple pairs of repositories using different argument
values. Recording the argument value in the results names has two main
advantages:
* It is easy to remember the value used to create a pair,
* It get simpler to create multiple pair at the same time from the same source.
Previously, running: `./discovery-helper.sh pypy 50 10` would create a
`pypy-left` and `pypy-right` repository. Now it will create `pypy-50h-10d-left`
and `pypy-50h-10d-right`.
discovery-helper: echo the stripped revsets early
Having them printed early make it easy for a user to just grab the generated
revset and directly uses them
contrib: move the `discovery-helper.sh` script in`perf-utils` directory
The script appeared before the directory. However the directory exists for this
kind of script. We move it there.
tests: stabilize test-split.t for Windows
It looks like there will be additional problems beyond this trivial fix, but
this should make the bot green again.
tests: stabilize test-share.t on Windows
PYTHON was not getting mangled for MSYS style paths, and remote was spitting out
remote: 'C' is not recognized as an internal or external command,
remote: operable program or batch file.
(once -q was removed). Additionally, this should fix a failure with py3 because
of spaces in the path.
split: add tests which demonstrate the
issue5864
Differential Revision: https://phab.mercurial-scm.org/D6057
discovery: clarify why the caching of children is valid
Yuya Nishihara pointed out that the code looks wrong without this clarification.
(And, unsurprisingly, Yuya is right)
tests: clarify test setup test in test-uncommit.t
I assume the "hg uncommit b" is there to prove that the working copy
is dirty before we try "hg uncommit --allow-dirty-working-copy b". It
seems clearer to put that check just before we run the actual test.
Differential Revision: https://phab.mercurial-scm.org/D6078