archival: tar file modes need to be sysstrs
authorAugie Fackler <augie@google.com>
Sun, 04 Mar 2018 12:08:37 -0500
changeset 36731 abf252a1c938
parent 36730 bfe23afea361
child 36732 7f9a6f5f7612
archival: tar file modes need to be sysstrs Differential Revision: https://phab.mercurial-scm.org/D2655
mercurial/archival.py
--- a/mercurial/archival.py	Sun Mar 04 12:08:19 2018 -0500
+++ b/mercurial/archival.py	Sun Mar 04 12:08:37 2018 -0500
@@ -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)