diff mercurial/patch.py @ 36423:2831d918e1b4

py3: convert known-int values to bytes using %d I decided to grep around for \sstr\( and see what low-hanging fruit that showed me. This was part of that hunt. That grep pattern still has some things worth exploring. Differential Revision: https://phab.mercurial-scm.org/D2441
author Augie Fackler <augie@google.com>
date Sun, 25 Feb 2018 23:09:07 -0500
parents 6ea0b78ddcac
children 588048a6a8d3
line wrap: on
line diff
--- a/mercurial/patch.py	Sun Feb 25 23:08:41 2018 -0500
+++ b/mercurial/patch.py	Sun Feb 25 23:09:07 2018 -0500
@@ -566,7 +566,7 @@
                 root = tempfile.mkdtemp(prefix='hg-patch-')
                 self.opener = vfsmod.vfs(root)
             # Avoid filename issues with these simple names
-            fn = str(self.created)
+            fn = '%d' % self.created
             self.opener.write(fn, data)
             self.created += 1
             self.files[fname] = (fn, mode, copied)