sshpeer: log remote capabilities after protocol upgrade
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 08 Feb 2018 11:39:23 -0800
changeset 36254 7218e93ade47
parent 36253 464bedc0fdb4
child 36255 1ee1a42bfdae
sshpeer: log remote capabilities after protocol upgrade This helps reduce variance with version 1 and will help prevent test output divergence as we start testing protocol version 2 more widely. Differential Revision: https://phab.mercurial-scm.org/D2205
mercurial/sshpeer.py
tests/test-ssh-proto.t
--- a/mercurial/sshpeer.py	Mon Feb 12 16:33:54 2018 -0800
+++ b/mercurial/sshpeer.py	Thu Feb 08 11:39:23 2018 -0800
@@ -313,6 +313,8 @@
         if not capsline.startswith('capabilities: '):
             badresponse()
 
+        ui.debug('remote: %s\n' % capsline)
+
         caps.update(capsline.split(':')[1].split())
         # Trailing newline.
         stdout.read(1)
--- a/tests/test-ssh-proto.t	Mon Feb 12 16:33:54 2018 -0800
+++ b/tests/test-ssh-proto.t	Thu Feb 08 11:39:23 2018 -0800
@@ -484,6 +484,7 @@
   devel-peer-request:   pairs: 81 bytes
   sending between command
   protocol upgraded to exp-ssh-v2-0001
+  remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
   url: ssh://user@dummy/server
   local: no
   pushable: yes
@@ -500,6 +501,7 @@
   devel-peer-request:   pairs: 81 bytes
   sending between command
   protocol upgraded to exp-ssh-v2-0001
+  remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 $USUAL_BUNDLE2_CAPS_SERVER$ unbundle=HG10GZ,HG10BZ,HG10UN
   Main capabilities:
     batch
     branchmap