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`.