diff 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
line wrap: on
line diff
--- a/mercurial/sshpeer.py	Mon Apr 23 23:24:53 2018 -0400
+++ b/mercurial/sshpeer.py	Mon Apr 23 19:23:18 2018 +0100
@@ -261,11 +261,9 @@
             handshake.insert(0, 'upgrade %s %s\n' % (token, upgradecaps))
 
         if requestlog:
-            ui.debug('devel-peer-request: hello\n')
+            ui.debug('devel-peer-request: hello+between\n')
+            ui.debug('devel-peer-request:   pairs: %d bytes\n' % len(pairsarg))
         ui.debug('sending hello command\n')
-        if requestlog:
-            ui.debug('devel-peer-request: between\n')
-            ui.debug('devel-peer-request:   pairs: %d bytes\n' % len(pairsarg))
         ui.debug('sending between command\n')
 
         stdin.write(''.join(handshake))