py3: use pycompat.bytestr to convert _b85chars to bytes
The tranformer does append b'' to the value and make that a bytes but bytes in
Python 3 returns the ascii value on getting characters using indexing.
Characters of this string are queried using indexing multiple times in the file
and to support that we use pycompat.bytestr which returns the bytechrs using
indexing.
Differential Revision: https://phab.mercurial-scm.org/D2072
py3: use pycompat.bytechr instead of chr
Differential Revision: https://phab.mercurial-scm.org/D2071
py3: use pycompat.ziplist instead of zip
zip returns a zip object instead of a list on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2070
patches: move assignment outside the conditional
Having this movement in its own patch will make the next patch clearer.
sshpeer: remove support for connecting to <0.9.1 servers (BC)
197d10e157ce made this change for the HTTP peer. Let's do the same
for the SSH peer.
Test output changes as expected. A redundant test has been dropped.
.. bc::
Support for connecting to Mercurial servers older than 0.9.1 has
been removed.
Differential Revision: https://phab.mercurial-scm.org/D2036
sshpeer: document the handshake mechanism
The mechanism by which SSH peers establish connections with remotes
is wonky and requires a bit of code archeology to understand. While
it is already documented in `hg help internals.wireproto`, it helps
to have documentation in the code as well.
Differential Revision: https://phab.mercurial-scm.org/D2035
sshpeer: move handshake outside of sshpeer
With the handshake now performed before a peer class is instantiated,
we can now instantiate a different peer class depending on the results
of the handshake.
Our test extension had to change to cope with the new API. Because
we now issue the command via raw I/O calls and don't call
_callstream(), we no longer have to register the fake command.
(_callstream() uses the command registration to see what args to
send).
Differential Revision: https://phab.mercurial-scm.org/D2034