Mercurial > public > mercurial-scm > hg
comparison mercurial/sshserver.py @ 30014:d34cf260d15b
wireproto: rename argument to groupchunks()
groupchunks() is a generic "turn a file object into a generator"
function. It isn't limited to changegroups. Rename the argument
and update the docstring to reflect this.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 25 Sep 2016 12:20:31 -0700 |
parents | 1a29db79a98d |
children | d105195436c0 |
comparison
equal
deleted
inserted
replaced
30013:1659549870e1 | 30014:d34cf260d15b |
---|---|
66 count = int(self.fin.readline()) | 66 count = int(self.fin.readline()) |
67 | 67 |
68 def redirect(self): | 68 def redirect(self): |
69 pass | 69 pass |
70 | 70 |
71 def groupchunks(self, changegroup): | 71 def groupchunks(self, fh): |
72 return iter(lambda: changegroup.read(4096), '') | 72 return iter(lambda: fh.read(4096), '') |
73 | 73 |
74 def sendresponse(self, v): | 74 def sendresponse(self, v): |
75 self.fout.write("%d\n" % len(v)) | 75 self.fout.write("%d\n" % len(v)) |
76 self.fout.write(v) | 76 self.fout.write(v) |
77 self.fout.flush() | 77 self.fout.flush() |