changeset 36751:f14ba6eb2b5a

archival: use py3 friendly replacements for chr() and long() Differential Revision: https://phab.mercurial-scm.org/D2673
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 16:06:47 -0500
parents d3c231f8d27d
children 389b950f5190
files contrib/python3-whitelist mercurial/archival.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Sun Mar 04 16:06:27 2018 -0500
+++ b/contrib/python3-whitelist	Sun Mar 04 16:06:47 2018 -0500
@@ -177,6 +177,7 @@
 test-issue842.t
 test-journal-exists.t
 test-largefiles-cache.t
+test-largefiles-misc.t
 test-largefiles-small-disk.t
 test-locate.t
 test-lock-badness.t
@@ -227,6 +228,7 @@
 test-mq-safety.t
 test-mq-symlinks.t
 test-mv-cp-st-diff.t
+test-narrow-archive.t
 test-narrow-clone-no-ellipsis.t
 test-narrow-clone-nonlinear.t
 test-narrow-clone.t
@@ -362,6 +364,7 @@
 test-status-terse.t
 test-strip-cross.t
 test-strip.t
+test-subrepo-deep-nested-change.t
 test-subrepo.t
 test-symlinks.t
 test-treemanifest.t
--- a/mercurial/archival.py	Sun Mar 04 16:06:27 2018 -0500
+++ b/mercurial/archival.py	Sun Mar 04 16:06:47 2018 -0500
@@ -142,8 +142,8 @@
             flags = 0
             if fname:
                 flags = gzip.FNAME
-            self.fileobj.write(chr(flags))
-            gzip.write32u(self.fileobj, long(self.timestamp))
+            self.fileobj.write(pycompat.bytechr(flags))
+            gzip.write32u(self.fileobj, int(self.timestamp))
             self.fileobj.write('\002')
             self.fileobj.write('\377')
             if fname: