Patchwork D2205: sshpeer: log remote capabilities after protocol upgrade

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 12:46 a.m.
Message ID <differential-rev-PHID-DREV-mnz746volommk4tqyijz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27753/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 12:46 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This helps reduce variance with version 1 and will help prevent
  test output divergence as we start testing protocol version 2 more
  widely.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2205

AFFECTED FILES
  mercurial/sshpeer.py
  tests/test-ssh-proto.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -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
diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py
--- a/mercurial/sshpeer.py
+++ b/mercurial/sshpeer.py
@@ -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)