Patchwork D2673: archival: use py3 friendly replacements for chr() and long()

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 9:13 p.m.
Message ID <differential-rev-PHID-DREV-resuss3sh56mx7eenfes-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28996/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 9:13 p.m.
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/archival.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -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:
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -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