Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 43710:c5bcd946a34b stable
py3: use pycompat.bytestr() instead of pycompat.sysstr()
pycompat.sysstr() doesn?t work because it doesn?t accept arguments of type
`type` and returns a unicode object on Python3, while the format string wants
a bytes-like object.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Tue, 19 Nov 2019 11:59:43 +0100 |
parents | bf87f5ff2ebf |
children | 88a306478556 |
comparison
equal
deleted
inserted
replaced
43677:0f82b29f7494 | 43710:c5bcd946a34b |
---|---|
1566 node = bin(changeid) | 1566 node = bin(changeid) |
1567 rev = self.changelog.rev(node) | 1567 rev = self.changelog.rev(node) |
1568 else: | 1568 else: |
1569 raise error.ProgrammingError( | 1569 raise error.ProgrammingError( |
1570 b"unsupported changeid '%s' of type %s" | 1570 b"unsupported changeid '%s' of type %s" |
1571 % (changeid, pycompat.sysstr(type(changeid))) | 1571 % (changeid, pycompat.bytestr(type(changeid))) |
1572 ) | 1572 ) |
1573 | 1573 |
1574 return context.changectx(self, rev, node) | 1574 return context.changectx(self, rev, node) |
1575 | 1575 |
1576 except (error.FilteredIndexError, error.FilteredLookupError): | 1576 except (error.FilteredIndexError, error.FilteredLookupError): |