narrow: mark wire proto capability names experimental and versioned
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 11 Sep 2018 10:54:20 -0700
changeset 39530 576b92928cc7
parent 39529 e82da0fcc7c5
child 39531 0d572769046a
narrow: mark wire proto capability names experimental and versioned We already plan to add a "widen" wire protocol command to the "narrow" capability, so let's version the capabilities as "exp-narrow-1" and "exp-ellipses-1". When we add the "widen" command, we will then add a "exp-narrow-2" capability to indicate support for that command. Differential Revision: https://phab.mercurial-scm.org/D4529
hgext/narrow/narrowwirepeer.py
tests/test-narrow-clone-non-narrow-server.t
--- a/hgext/narrow/narrowwirepeer.py	Tue Sep 11 10:50:46 2018 -0700
+++ b/hgext/narrow/narrowwirepeer.py	Tue Sep 11 10:54:20 2018 -0700
@@ -17,8 +17,8 @@
     wireprotov1server,
 )
 
-NARROWCAP = 'narrow'
-ELLIPSESCAP = 'ellipses'
+NARROWCAP = 'exp-narrow-1'
+ELLIPSESCAP = 'exp-ellipses-1'
 
 def uisetup():
     def peersetup(ui, peer):
--- a/tests/test-narrow-clone-non-narrow-server.t	Tue Sep 11 10:50:46 2018 -0700
+++ b/tests/test-narrow-clone-non-narrow-server.t	Tue Sep 11 10:54:20 2018 -0700
@@ -33,7 +33,7 @@
   $ echo hello | hg -R . serve --stdio | \
   >   $PYTHON unquote.py | grep narrow
   narrow=v0
-  rev-branch-cache changegroupsubset getbundle known lookup narrow protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  rev-branch-cache changegroupsubset exp-narrow-1 getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
 
   $ cd ..