hgext/largefiles/lfutil.py
changeset 15700 1facaad963a8
parent 15660 c7b0bedbb07a
parent 15699 84e55467093c
child 15793 3ef07ecdb0d5
--- a/hgext/largefiles/lfutil.py	Mon Dec 19 11:37:44 2011 +0100
+++ b/hgext/largefiles/lfutil.py	Wed Dec 21 14:36:08 2011 -0600
@@ -79,7 +79,7 @@
     except OSError:
         # if hardlinks fail, fallback on atomic copy
         dst = util.atomictempfile(dest)
-        for chunk in util.filechunkiter(open(src)):
+        for chunk in util.filechunkiter(open(src, 'rb')):
             dst.write(chunk)
         dst.close()
         os.chmod(dest, os.stat(src).st_mode)
@@ -238,7 +238,7 @@
         link(usercachepath(repo.ui, hash), storepath(repo, hash))
     else:
         dst = util.atomictempfile(storepath(repo, hash))
-        for chunk in util.filechunkiter(open(file)):
+        for chunk in util.filechunkiter(open(file, 'rb')):
             dst.write(chunk)
         dst.close()
         util.copymode(file, storepath(repo, hash))