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

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

Comments

phabricator - March 4, 2018, 9:44 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf14ba6eb2b5a: archival: use py3 friendly replacements for chr() and long() (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2673?vs=6616&id=6625

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