D2672: archival: ensure file mode for gzipfile is sysstr

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sun Mar 4 16:44:09 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd3c231f8d27d: archival: ensure file mode for gzipfile is sysstr (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2672?vs=6615&id=6624

REVISION DETAIL
  https://phab.mercurial-scm.org/D2672

AFFECTED FILES
  mercurial/archival.py

CHANGE DETAILS

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -158,7 +158,8 @@
                 mode = mode[0:1]
                 if not fileobj:
                     fileobj = open(name, mode + 'b')
-                gzfileobj = self.GzipFileWithTime(name, mode + 'b',
+                gzfileobj = self.GzipFileWithTime(name,
+                                                  pycompat.sysstr(mode + 'b'),
                                                   zlib.Z_BEST_COMPRESSION,
                                                   fileobj, timestamp=mtime)
                 self.fileobj = gzfileobj



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list