Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
36422:04c319a07c7b | 36423:2831d918e1b4 |
---|---|
564 else: | 564 else: |
565 if self.opener is None: | 565 if self.opener is None: |
566 root = tempfile.mkdtemp(prefix='hg-patch-') | 566 root = tempfile.mkdtemp(prefix='hg-patch-') |
567 self.opener = vfsmod.vfs(root) | 567 self.opener = vfsmod.vfs(root) |
568 # Avoid filename issues with these simple names | 568 # Avoid filename issues with these simple names |
569 fn = str(self.created) | 569 fn = '%d' % self.created |
570 self.opener.write(fn, data) | 570 self.opener.write(fn, data) |
571 self.created += 1 | 571 self.created += 1 |
572 self.files[fname] = (fn, mode, copied) | 572 self.files[fname] = (fn, mode, copied) |
573 | 573 |
574 def getfile(self, fname): | 574 def getfile(self, fname): |