changeset 36254:7218e93ade47

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 08 Feb 2018 11:39:23 -0800
parents 464bedc0fdb4
children 1ee1a42bfdae
files mercurial/sshpeer.py tests/test-ssh-proto.t
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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