changeset 5446:fa836e050c50

chunkbuffer: removed unused method and arg
author Matt Mackall <mpm@selenic.com>
date Thu, 11 Oct 2007 00:46:48 -0500
parents 64cf1c853674
children 56591846f819
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Thu Oct 11 00:46:47 2007 -0500
+++ b/mercurial/util.py	Thu Oct 11 00:46:48 2007 -0500
@@ -1396,27 +1396,14 @@
     """Allow arbitrary sized chunks of data to be efficiently read from an
     iterator over chunks of arbitrary size."""
 
-    def __init__(self, in_iter, targetsize = 2**16):
+    def __init__(self, in_iter):
         """in_iter is the iterator that's iterating over the input chunks.
         targetsize is how big a buffer to try to maintain."""
         self.in_iter = iter(in_iter)
         self.buf = ''
-        self.targetsize = int(targetsize)
-        if self.targetsize <= 0:
-            raise ValueError(_("targetsize must be greater than 0, was %d") %
-                             targetsize)
+        self.targetsize = 2**16
         self.iterempty = False
 
-    def fillbuf(self):
-        """Ignore target size; read every chunk from iterator until empty."""
-        if not self.iterempty:
-            collector = cStringIO.StringIO()
-            collector.write(self.buf)
-            for ch in self.in_iter:
-                collector.write(ch)
-            self.buf = collector.getvalue()
-            self.iterempty = True
-
     def read(self, l):
         """Read L bytes of data from the iterator of chunks of data.
         Returns less than L bytes if the iterator runs dry."""