hgext/largefiles/lfutil.py
changeset 30180 736f92c44656
parent 30142 3dcaf1c4e90d
child 30181 7356e6b1f5b8
--- a/hgext/largefiles/lfutil.py	Fri Oct 14 23:33:00 2016 +0900
+++ b/hgext/largefiles/lfutil.py	Wed Oct 12 12:22:18 2016 +0200
@@ -231,7 +231,8 @@
     # don't use atomic writes in the working copy.
     with open(path, 'rb') as srcfd:
         with wvfs(filename, 'wb') as destfd:
-            gothash = copyandhash(srcfd, destfd)
+            gothash = copyandhash(
+                util.filechunkiter(srcfd), destfd)
     if gothash != hash:
         repo.ui.warn(_('%s: data corruption in %s with hash %s\n')
                      % (filename, path, gothash))