comparison mercurial/sshpeer.py @ 37813:58bbd14b0c62 stable

sshpeer: reflect actual command activity one handshake The output from devel-peer-request is expected to give data about request and roundtrip done to the server. Changeset a9cffd14aa04 changed some of that by grouping hello and between commands call. However, the old sequence of command was "emulated" in sshpeer. Update the sshpeer to reflect this grouping of commands and update the tests that use it.
author Boris Feld <boris.feld@octobus.net>
date Mon, 23 Apr 2018 19:23:18 +0100
parents b4d85bc122bd
children 67dc32d4e790
comparison
equal deleted inserted replaced
37812:91b717e2cafa 37813:58bbd14b0c62
259 if ui.configbool('experimental', 'sshpeer.advertise-v2'): 259 if ui.configbool('experimental', 'sshpeer.advertise-v2'):
260 ui.debug('sending upgrade request: %s %s\n' % (token, upgradecaps)) 260 ui.debug('sending upgrade request: %s %s\n' % (token, upgradecaps))
261 handshake.insert(0, 'upgrade %s %s\n' % (token, upgradecaps)) 261 handshake.insert(0, 'upgrade %s %s\n' % (token, upgradecaps))
262 262
263 if requestlog: 263 if requestlog:
264 ui.debug('devel-peer-request: hello\n') 264 ui.debug('devel-peer-request: hello+between\n')
265 ui.debug('devel-peer-request: pairs: %d bytes\n' % len(pairsarg))
265 ui.debug('sending hello command\n') 266 ui.debug('sending hello command\n')
266 if requestlog:
267 ui.debug('devel-peer-request: between\n')
268 ui.debug('devel-peer-request: pairs: %d bytes\n' % len(pairsarg))
269 ui.debug('sending between command\n') 267 ui.debug('sending between command\n')
270 268
271 stdin.write(''.join(handshake)) 269 stdin.write(''.join(handshake))
272 stdin.flush() 270 stdin.flush()
273 except IOError: 271 except IOError: