diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -35,7 +35,7 @@ class webproto(object): def redirect(self): self.oldio = sys.stdout, sys.stderr sys.stderr = sys.stdout = cStringIO.StringIO() - def respond(self, s): + def sendresponse(self, s): self.req.respond(HTTP_OK, HGTYPE, length=len(s)) self.response = s def sendchangegroup(self, cg): @@ -51,7 +51,7 @@ class webproto(object): self.req.respond(HTTP_OK, HGTYPE) for chunk in source: self.req.write(chunk) - def respondpush(self, ret): + def sendpushresponse(self, ret): val = sys.stdout.getvalue() sys.stdout, sys.stderr = self.oldio self.req.respond(HTTP_OK, HGTYPE) diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -50,7 +50,7 @@ class sshserver(object): return self.getargs(name)[0] def getfile(self, fpout): - self.respond('') + self.sendresponse('') count = int(self.fin.readline()) while count: fpout.write(self.fin.read(count)) @@ -59,7 +59,7 @@ class sshserver(object): def redirect(self): pass - def respond(self, v): + def sendresponse(self, v): self.fout.write("%d\n" % len(v)) self.fout.write(v) self.fout.flush() @@ -78,9 +78,9 @@ class sshserver(object): self.fout.write(chunk) self.fout.flush() - def respondpush(self, ret): - self.respond('') - self.respond(str(ret)) + def sendpushresponse(self, ret): + self.sendresponse('') + self.sendresponse(str(ret)) def serve_forever(self): try: @@ -100,8 +100,8 @@ class sshserver(object): if impl: r = impl() if r is not None: - self.respond(r) - else: self.respond("") + self.sendresponse(r) + else: self.sendresponse("") return cmd != '' def do_lock(self): @@ -122,10 +122,10 @@ class sshserver(object): '''DEPRECATED''' if not self.lock: - self.respond("not locked") + self.sendresponse("not locked") return - self.respond("") + self.sendresponse("") r = self.repo.addchangegroup(self.fin, 'serve', self._client(), lock=self.lock) return str(r) diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -138,7 +138,7 @@ def dispatch(repo, proto, command): args = proto.getargs(spec) r = func(repo, proto, *args) if r != None: - proto.respond(r) + proto.sendresponse(r) def between(repo, proto, pairs): pairs = [decodelist(p, '-') for p in pairs.split(" ")] @@ -262,7 +262,7 @@ def unbundle(repo, proto, heads): sys.stderr.write("abort: %s\n" % inst) finally: lock.release() - proto.respondpush(r) + proto.sendpushresponse(r) finally: fp.close()