equal
deleted
inserted
replaced
33 for s in util.filechunkiter(self.req, limit=length): |
33 for s in util.filechunkiter(self.req, limit=length): |
34 fp.write(s) |
34 fp.write(s) |
35 def redirect(self): |
35 def redirect(self): |
36 self.oldio = sys.stdout, sys.stderr |
36 self.oldio = sys.stdout, sys.stderr |
37 sys.stderr = sys.stdout = cStringIO.StringIO() |
37 sys.stderr = sys.stdout = cStringIO.StringIO() |
38 def respond(self, s): |
38 def sendresponse(self, s): |
39 self.req.respond(HTTP_OK, HGTYPE, length=len(s)) |
39 self.req.respond(HTTP_OK, HGTYPE, length=len(s)) |
40 self.response = s |
40 self.response = s |
41 def sendchangegroup(self, cg): |
41 def sendchangegroup(self, cg): |
42 self.req.respond(HTTP_OK, HGTYPE) |
42 self.req.respond(HTTP_OK, HGTYPE) |
43 z = zlib.compressobj() |
43 z = zlib.compressobj() |
49 self.req.write(z.flush()) |
49 self.req.write(z.flush()) |
50 def sendstream(self, source): |
50 def sendstream(self, source): |
51 self.req.respond(HTTP_OK, HGTYPE) |
51 self.req.respond(HTTP_OK, HGTYPE) |
52 for chunk in source: |
52 for chunk in source: |
53 self.req.write(chunk) |
53 self.req.write(chunk) |
54 def respondpush(self, ret): |
54 def sendpushresponse(self, ret): |
55 val = sys.stdout.getvalue() |
55 val = sys.stdout.getvalue() |
56 sys.stdout, sys.stderr = self.oldio |
56 sys.stdout, sys.stderr = self.oldio |
57 self.req.respond(HTTP_OK, HGTYPE) |
57 self.req.respond(HTTP_OK, HGTYPE) |
58 self.response = '%d\n%s' % (ret, val) |
58 self.response = '%d\n%s' % (ret, val) |
59 def _client(self): |
59 def _client(self): |