diff hgext/convert/git.py @ 7222:c1dc903dc7b6

convert: read git output in binary mode under Windows (issue 1359)
author Patrick Mezard <pmezard@gmail.com>
date Thu, 23 Oct 2008 14:05:11 +0200
parents e30c56f337b1
children d1dff8c492dd a8e4e599e17f
line wrap: on
line diff
--- a/hgext/convert/git.py	Thu Oct 23 15:35:54 2008 +0200
+++ b/hgext/convert/git.py	Thu Oct 23 14:05:11 2008 +0200
@@ -14,7 +14,7 @@
             prevgitdir = os.environ.get('GIT_DIR')
             os.environ['GIT_DIR'] = self.path
             try:
-                return util.popen(s)
+                return util.popen(s, 'rb')
             finally:
                 if prevgitdir is None:
                     del os.environ['GIT_DIR']
@@ -22,7 +22,7 @@
                     os.environ['GIT_DIR'] = prevgitdir
     else:
         def gitcmd(self, s):
-            return util.popen('GIT_DIR=%s %s' % (self.path, s))
+            return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
 
     def __init__(self, ui, path, rev=None):
         super(convert_git, self).__init__(ui, path, rev=rev)