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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Apr 12 11:08:14 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5b836a4c9a1f: py3: use b'%d' 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

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,



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


More information about the Mercurial-devel mailing list