# HG changeset patch # User Augie Fackler # Date 1520183317 18000 # Node ID abf252a1c9387f69f2ad493c490a25cb68b88ded # Parent bfe23afea361644ebefabc362dc3b90059cea58b archival: tar file modes need to be sysstrs Differential Revision: https://phab.mercurial-scm.org/D2655 diff -r bfe23afea361 -r abf252a1c938 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)