hgext/largefiles/overrides.py
changeset 19001 2a35296a6304
parent 18981 83ead8cb0ff2
child 19161 24877c50aada
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