Patchwork D2655: archival: tar file modes need to be sysstrs

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 6:34 p.m.
Message ID <6ad05ab8bfd19fc4dae336b7f23792c6@localhost.localdomain>
Download mbox | patch
Permalink /patch/28960/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2018, 6:34 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGabf252a1c938: archival: tar file modes need to be sysstrs (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2655?vs=6574&id=6583

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

AFFECTED FILES
  mercurial/archival.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -162,9 +162,11 @@ 
                                                   zlib.Z_BEST_COMPRESSION,
                                                   fileobj, timestamp=mtime)
                 self.fileobj = gzfileobj
-                return tarfile.TarFile.taropen(name, mode, gzfileobj)
+                return tarfile.TarFile.taropen(
+                    name, pycompat.sysstr(mode), gzfileobj)
             else:
-                return tarfile.open(name, mode + kind, fileobj)
+                return tarfile.open(
+                    name, pycompat.sysstr(mode + kind), fileobj)
 
         if isinstance(dest, str):
             self.z = taropen('w:', name=dest)