Mercurial > hg
comparison hgext/convert/subversion.py @ 44965:8439351d3208 stable
py3: use `%d` for int in % formatting
On Python 3, `%s` is an alias to `%b`, which requires that the object implements
`__bytes__()`, which is not the case for `int`.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Mon, 15 Jun 2020 03:34:23 +0200 |
parents | 4888adfb6235 |
children | 0c27d981131a |
comparison
equal
deleted
inserted
replaced
44964:d96d8bbbedb1 | 44965:8439351d3208 |
---|---|
771 util.tonativeeol(b'%s %d\n' % (destrev, self.revnum(rev))) | 771 util.tonativeeol(b'%s %d\n' % (destrev, self.revnum(rev))) |
772 ) | 772 ) |
773 self.convertfp.flush() | 773 self.convertfp.flush() |
774 | 774 |
775 def revid(self, revnum, module=None): | 775 def revid(self, revnum, module=None): |
776 return b'svn:%s%s@%s' % (self.uuid, module or self.module, revnum) | 776 return b'svn:%s%s@%d' % (self.uuid, module or self.module, revnum) |
777 | 777 |
778 def revnum(self, rev): | 778 def revnum(self, rev): |
779 return int(rev.split(b'@')[-1]) | 779 return int(rev.split(b'@')[-1]) |
780 | 780 |
781 def latest(self, path, stop=None): | 781 def latest(self, path, stop=None): |