Patchwork D3280: py3: use b'%d' to convert int to bytes instead of str()

login
register
mail settings
Submitter phabricator
Date April 12, 2018, 3:08 p.m.
Message ID <055c34c51692b70256d880468a586826@localhost.localdomain>
Download mbox | patch
Permalink /patch/30791/
State Not Applicable
Headers show

Comments

phabricator - April 12, 2018, 3:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5b836a4c9a1f: py3: use b&#039;%d&#039; to convert int to bytes instead of str() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3280?vs=8047&id=8059

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

AFFECTED FILES
  hgext/convert/git.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -372,7 +372,7 @@ 
 
         tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:]
         tz = -int(tzs) * (int(tzh) * 3600 + int(tzm))
-        date = tm + " " + str(tz)
+        date = tm + " " + (b"%d" % tz)
         saverev = self.ui.configbool('convert', 'git.saverev')
 
         c = common.commit(parents=parents, date=date, author=author,