mercurial/util.py
changeset 12086 dba2db7a7c28
parent 12079 41e56e07eef5
child 12087 a88a4720c2f0
equal deleted inserted replaced
12085:6f833fc3ccab 12086:dba2db7a7c28
   948                 buf += chunk[:left]
   948                 buf += chunk[:left]
   949             else:
   949             else:
   950                 buf += chunk
   950                 buf += chunk
   951 
   951 
   952         return buf
   952         return buf
   953         
   953 
   954 def filechunkiter(f, size=65536, limit=None):
   954 def filechunkiter(f, size=65536, limit=None):
   955     """Create a generator that produces the data in the file size
   955     """Create a generator that produces the data in the file size
   956     (default 65536) bytes at a time, up to optional limit (default is
   956     (default 65536) bytes at a time, up to optional limit (default is
   957     to read all data).  Chunks may be less than size bytes if the
   957     to read all data).  Chunks may be less than size bytes if the
   958     chunk is the last chunk in the file, or the file is a socket or
   958     chunk is the last chunk in the file, or the file is a socket or