hgext/largefiles/lfcommands.py
changeset 18973 5f9019e6d451
parent 18731 c2d079387b2c
child 18974 d78a136a8036
--- a/hgext/largefiles/lfcommands.py	Tue Apr 16 13:55:38 2013 +0200
+++ b/hgext/largefiles/lfcommands.py	Mon Apr 15 01:41:49 2013 +0200
@@ -542,7 +542,8 @@
     path = lfutil.usercachepath(repo.ui, hash)
     fpout = cmdutil.makefileobj(repo, filename)
     fpin = open(path, "rb")
-    fpout.write(fpin.read())
+    for chunk in lfutil.blockstream(fpin):
+        fpout.write(chunk)
     fpout.close()
     fpin.close()
     return 0