Mercurial > hg
changeset 11588:8a1f625e971d
protocol: unify stream_out client code
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Jul 2010 16:55:44 -0500 |
parents | a036f6bd1da3 |
children | e8d22fe2ddab |
files | mercurial/httprepo.py mercurial/sshrepo.py mercurial/wireproto.py |
diffstat | 3 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httprepo.py Wed Jul 14 16:35:51 2010 -0500 +++ b/mercurial/httprepo.py Wed Jul 14 16:55:44 2010 -0500 @@ -141,6 +141,9 @@ def _call(self, cmd, **args): return self.do_read(cmd, **args) + def _callstream(self, cmd, **args): + return self.do_cmd(cmd, **args) + def _abort(self, exception): raise exception @@ -205,9 +208,6 @@ fp.close() os.unlink(tempname) - def stream_out(self): - return self.do_cmd('stream_out') - class httpsrepository(httprepository): def __init__(self, ui, path): if not url.has_https:
--- a/mercurial/sshrepo.py Wed Jul 14 16:35:51 2010 -0500 +++ b/mercurial/sshrepo.py Wed Jul 14 16:55:44 2010 -0500 @@ -136,6 +136,9 @@ self.do_cmd(cmd, **args) return self._recv() + def _callstream(self, cmd, **args): + return self.do_cmd(cmd, **args) + def _recv(self): l = self.pipei.readline() self.readerr() @@ -224,7 +227,4 @@ except: self.abort(error.ResponseError(_("unexpected response:"), r)) - def stream_out(self): - return self.do_cmd('stream_out') - instance = sshrepository
--- a/mercurial/wireproto.py Wed Jul 14 16:35:51 2010 -0500 +++ b/mercurial/wireproto.py Wed Jul 14 16:55:44 2010 -0500 @@ -88,6 +88,9 @@ r[k.decode('string-escape')] = v.decode('string-escape') return r + def stream_out(self): + return self._callstream('stream_out') + # server side def dispatch(repo, proto, command):