##// END OF EJS Templates
py3: use pycompat.bytestr() intsead of str...
Pulkit Goyal -
r37334:9954d0e2 default
parent child Browse files
Show More
@@ -226,7 +226,7 b' class journalentry(collections.namedtupl'
226 226
227 227 def __bytes__(self):
228 228 """bytes representation for storage"""
229 time = ' '.join(map(str, self.timestamp))
229 time = ' '.join(map(pycompat.bytestr, self.timestamp))
230 230 oldhashes = ','.join([node.hex(hash) for hash in self.oldhashes])
231 231 newhashes = ','.join([node.hex(hash) for hash in self.newhashes])
232 232 return '\n'.join((
@@ -2,13 +2,13 b' Setup:'
2 2 $ cat > eval.py <<EOF
3 3 > from __future__ import absolute_import
4 4 > import filecmp
5 > from mercurial import commands, context, registrar
5 > from mercurial import commands, context, pycompat, registrar
6 6 > cmdtable = {}
7 7 > command = registrar.command(cmdtable)
8 8 > @command(b'eval', [], b'hg eval CMD')
9 9 > def eval_(ui, repo, *cmds, **opts):
10 10 > cmd = b" ".join(cmds)
11 > res = str(eval(cmd, globals(), locals()))
11 > res = pycompat.bytestr(eval(cmd, globals(), locals()))
12 12 > ui.warn(b"%s" % res)
13 13 > EOF
14 14
General Comments 0
You need to be logged in to leave comments. Login now