indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I have plans to implement stream clone using a better mechanism than
  this existing command. Let's not carry it forward to wire protocol
  version 2.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/wireproto.py
  tests/test-wireproto-command-capabilities.t

CHANGE DETAILS

diff --git a/tests/test-wireproto-command-capabilities.t 
b/tests/test-wireproto-command-capabilities.t
--- a/tests/test-wireproto-command-capabilities.t
+++ b/tests/test-wireproto-command-capabilities.t
@@ -30,11 +30,11 @@
   s>     \r\n
   s>     *\r\n (glob)
   s>     *\x00\x01\x00\x02\x01F (glob)
-  s>     
\xa2Hcommands\xabEheads\xa2Dargs\x81JpubliconlyKpermissions\x81DpullEknown\xa2Dargs\x81EnodesKpermissions\x81DpullFlookup\xa2Dargs\x81CkeyKpermissions\x81DpullGpushkey\xa2Dargs\x84CkeyInamespaceCnewColdKpermissions\x81DpushHlistkeys\xa2Dargs\x81InamespaceKpermissions\x81DpullHunbundle\xa2Dargs\x81EheadsKpermissions\x81DpushIbranchmap\xa2Dargs\x80Kpermissions\x81DpullIgetbundle\xa2Dargs\x81A*Kpermissions\x81DpullJstream_out\xa2Dargs\x80Kpermissions\x81DpullLcapabilities\xa2Dargs\x80Kpermissions\x81DpullLclonebundles\xa2Dargs\x80Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlib
+  s>     
\xa2Hcommands\xaaEheads\xa2Dargs\x81JpubliconlyKpermissions\x81DpullEknown\xa2Dargs\x81EnodesKpermissions\x81DpullFlookup\xa2Dargs\x81CkeyKpermissions\x81DpullGpushkey\xa2Dargs\x84CkeyInamespaceCnewColdKpermissions\x81DpushHlistkeys\xa2Dargs\x81InamespaceKpermissions\x81DpullHunbundle\xa2Dargs\x81EheadsKpermissions\x81DpushIbranchmap\xa2Dargs\x80Kpermissions\x81DpullIgetbundle\xa2Dargs\x81A*Kpermissions\x81DpullLcapabilities\xa2Dargs\x80Kpermissions\x81DpullLclonebundles\xa2Dargs\x80Kpermissions\x81DpullKcompression\x82\xa1DnameDzstd\xa1DnameDzlib
   s>     \r\n
   received frame(size=*; request=1; stream=2; streamflags=stream-begin; 
type=bytes-response; flags=eos|cbor) (glob)
   s>     0\r\n
   s>     \r\n
-  response: [{b'commands': {b'branchmap': {b'args': [], b'permissions': 
[b'pull']}, b'capabilities': {b'args': [], b'permissions': [b'pull']}, 
b'clonebundles': {b'args': [], b'permissions': [b'pull']}, b'getbundle': 
{b'args': [b'*'], b'permissions': [b'pull']}, b'heads': {b'args': 
[b'publiconly'], b'permissions': [b'pull']}, b'known': {b'args': [b'nodes'], 
b'permissions': [b'pull']}, b'listkeys': {b'args': [b'namespace'], 
b'permissions': [b'pull']}, b'lookup': {b'args': [b'key'], b'permissions': 
[b'pull']}, b'pushkey': {b'args': [b'key', b'namespace', b'new', b'old'], 
b'permissions': [b'push']}, b'stream_out': {b'args': [], b'permissions': 
[b'pull']}, b'unbundle': {b'args': [b'heads'], b'permissions': [b'push']}}, 
b'compression': [{b'name': b'zstd'}, {b'name': b'zlib'}]}]
+  response: [{b'commands': {b'branchmap': {b'args': [], b'permissions': 
[b'pull']}, b'capabilities': {b'args': [], b'permissions': [b'pull']}, 
b'clonebundles': {b'args': [], b'permissions': [b'pull']}, b'getbundle': 
{b'args': [b'*'], b'permissions': [b'pull']}, b'heads': {b'args': 
[b'publiconly'], b'permissions': [b'pull']}, b'known': {b'args': [b'nodes'], 
b'permissions': [b'pull']}, b'listkeys': {b'args': [b'namespace'], 
b'permissions': [b'pull']}, b'lookup': {b'args': [b'key'], b'permissions': 
[b'pull']}, b'pushkey': {b'args': [b'key', b'namespace', b'new', b'old'], 
b'permissions': [b'push']}, b'unbundle': {b'args': [b'heads'], b'permissions': 
[b'push']}}, b'compression': [{b'name': b'zstd'}, {b'name': b'zlib'}]}]
 
   $ cat error.log
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -1078,7 +1078,8 @@
     output = output.getvalue() if output else ''
     return wireprototypes.bytesresponse('%d\n%s' % (int(r), output))
 
-@wireprotocommand('stream_out', permission='pull')
+@wireprotocommand('stream_out', permission='pull',
+                  transportpolicy=POLICY_V1_ONLY)
 def stream(repo, proto):
     '''If the server supports streaming clone, it advertises the "stream"
     capability with a value representing the version and flags of the repo



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to