[PATCH bfiles] use binary mode to read/write files from an httpstore

Benjamin Pollack benjamin at bitquabit.com
Wed Jun 9 09:28:25 CDT 2010


# HG changeset patch
# User Benjamin Pollack <benjamin at bitquabit.com>
# Date 1276093276 14400
# Node ID ea79376a44f1472a1aeebed6a3b60ae3daa37dd2
# Parent  9e2d44a8c987f3868e61bae715467c55c4f0cb85
use binary mode to read/write files from an httpstore

diff --git a/bfiles.py b/bfiles.py
--- a/bfiles.py
+++ b/bfiles.py
@@ -1437,7 +1437,7 @@
         elif r:
             # error message from remote
             self.abort(error.RepoError(_("put failed: %s") % r))
-        fd = open(filename)
+        fd = open(filename, 'rb')
         while 1:
             d = fd.read(4096)
             if not d:


More information about the Mercurial-devel mailing list