changeset 4731:1d5a2ee683b0

Fix tgz archival on Windows. Making tgz's on Windows has been broken by 06de65673ec2 due to not being careful enough about binary mode opens.
author csaba.henk@creo.hu
date Wed, 27 Jun 2007 08:35:26 -0700
parents eadfaa9ec487
children b0520e3903fe
files mercurial/archival.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/archival.py	Tue Jun 26 22:38:57 2007 +0200
+++ b/mercurial/archival.py	Wed Jun 27 08:35:26 2007 -0700
@@ -72,7 +72,7 @@
             if kind == 'gz':
                 mode = mode[0]
                 if not fileobj:
-                    fileobj = open(name, mode)
+                    fileobj = open(name, mode + 'b')
                 gzfileobj = self.GzipFileWithTime(name, mode + 'b',
                                                   zlib.Z_BEST_COMPRESSION,
                                                   fileobj, timestamp=mtime)