Show More
@@ -1023,7 +1023,7 b' def unbundle(repo, proto, heads):' | |||
|
1023 | 1023 | hint=bundle2requiredhint) |
|
1024 | 1024 | |
|
1025 | 1025 | r = exchange.unbundle(repo, gen, their_heads, 'serve', |
|
1026 |
proto. |
|
|
1026 | proto.client()) | |
|
1027 | 1027 | if util.safehasattr(r, 'addpart'): |
|
1028 | 1028 | # The return looks streamable, we are in the bundle2 case |
|
1029 | 1029 | # and should return a stream. |
@@ -88,6 +88,10 b' class baseprotocolhandler(object):' | |||
|
88 | 88 | won't be captured. |
|
89 | 89 | """ |
|
90 | 90 | |
|
91 | @abc.abstractmethod | |
|
92 | def client(self): | |
|
93 | """Returns a string representation of this client (as bytes).""" | |
|
94 | ||
|
91 | 95 | def decodevaluefromheaders(req, headerprefix): |
|
92 | 96 | """Decode a long value from multiple HTTP request headers. |
|
93 | 97 | |
@@ -164,7 +168,7 b' class webproto(baseprotocolhandler):' | |||
|
164 | 168 | self._ui.fout = oldout |
|
165 | 169 | self._ui.ferr = olderr |
|
166 | 170 | |
|
167 |
def |
|
|
171 | def client(self): | |
|
168 | 172 | return 'remote:%s:%s:%s' % ( |
|
169 | 173 | self._req.env.get('wsgi.url_scheme') or 'http', |
|
170 | 174 | urlreq.quote(self._req.env.get('REMOTE_HOST', '')), |
@@ -399,7 +403,7 b' class sshv1protocolhandler(baseprotocolh' | |||
|
399 | 403 | def mayberedirectstdio(self): |
|
400 | 404 | yield None |
|
401 | 405 | |
|
402 |
def |
|
|
406 | def client(self): | |
|
403 | 407 | client = encoding.environ.get('SSH_CLIENT', '').split(' ', 1)[0] |
|
404 | 408 | return 'remote:ssh:' + client |
|
405 | 409 |
General Comments 0
You need to be logged in to leave comments.
Login now