Mercurial > hg
comparison hgext/largefiles/overrides.py @ 19001:2a35296a6304
largefiles: drop lfutil.blockstream - use filechunkiter like everybody else
The old chunk size is kept - just to avoid changing it.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 15 Apr 2013 23:43:44 +0200 |
parents | 83ead8cb0ff2 |
children | 24877c50aada |
comparison
equal
deleted
inserted
replaced
19000:eaf146e811a4 | 19001:2a35296a6304 |
---|---|
1196 raise util.Abort( | 1196 raise util.Abort( |
1197 _('largefile %s is not in cache and could not be ' | 1197 _('largefile %s is not in cache and could not be ' |
1198 'downloaded') % lf) | 1198 'downloaded') % lf) |
1199 path = lfutil.usercachepath(repo.ui, hash) | 1199 path = lfutil.usercachepath(repo.ui, hash) |
1200 fpin = open(path, "rb") | 1200 fpin = open(path, "rb") |
1201 for chunk in lfutil.blockstream(fpin): | 1201 for chunk in util.filechunkiter(fpin, 128 * 1024): |
1202 fp.write(chunk) | 1202 fp.write(chunk) |
1203 fpin.close() | 1203 fpin.close() |
1204 fp.close() | 1204 fp.close() |
1205 err = 0 | 1205 err = 0 |
1206 return err | 1206 return err |