Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.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 | 919a4b7f531d |
children | 3e86261bf110 |
comparison
equal
deleted
inserted
replaced
30013:1659549870e1 | 30014:d34cf260d15b |
---|---|
76 #def restore(self): | 76 #def restore(self): |
77 # """reinstall previous stdout and stderr and return intercepted stdout | 77 # """reinstall previous stdout and stderr and return intercepted stdout |
78 # """ | 78 # """ |
79 # raise NotImplementedError() | 79 # raise NotImplementedError() |
80 | 80 |
81 def groupchunks(self, cg): | 81 def groupchunks(self, fh): |
82 """return 4096 chunks from a changegroup object | 82 """Generator of chunks to send to the client. |
83 | 83 |
84 Some protocols may have compressed the contents.""" | 84 Some protocols may have compressed the contents. |
85 """ | |
85 raise NotImplementedError() | 86 raise NotImplementedError() |
86 | 87 |
87 class remotebatch(peer.batcher): | 88 class remotebatch(peer.batcher): |
88 '''batches the queued calls; uses as few roundtrips as possible''' | 89 '''batches the queued calls; uses as few roundtrips as possible''' |
89 def __init__(self, remote): | 90 def __init__(self, remote): |