Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.py @ 37534:465187fec06f
wireproto: only expose "stream_out" to version 1 transports
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.
Differential Revision: https://phab.mercurial-scm.org/D3201
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Apr 2018 16:49:57 -0700 |
parents | df4985497986 |
children | 69e46c1834ac |
comparison
equal
deleted
inserted
replaced
37533:df4985497986 | 37534:465187fec06f |
---|---|
1148 encoding.tolocal(old), new) or False | 1148 encoding.tolocal(old), new) or False |
1149 | 1149 |
1150 output = output.getvalue() if output else '' | 1150 output = output.getvalue() if output else '' |
1151 return wireprototypes.bytesresponse('%d\n%s' % (int(r), output)) | 1151 return wireprototypes.bytesresponse('%d\n%s' % (int(r), output)) |
1152 | 1152 |
1153 @wireprotocommand('stream_out', permission='pull') | 1153 @wireprotocommand('stream_out', permission='pull', |
1154 transportpolicy=POLICY_V1_ONLY) | |
1154 def stream(repo, proto): | 1155 def stream(repo, proto): |
1155 '''If the server supports streaming clone, it advertises the "stream" | 1156 '''If the server supports streaming clone, it advertises the "stream" |
1156 capability with a value representing the version and flags of the repo | 1157 capability with a value representing the version and flags of the repo |
1157 it is serving. Client checks to see if it understands the format. | 1158 it is serving. Client checks to see if it understands the format. |
1158 ''' | 1159 ''' |