# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-04-02 11:36:42 # Node ID 9954d0e2ad00ef3fd852ed75ba44c4b59f691caf # Parent 14da486e820d38e75f915374f7b66caa0977be34 py3: use pycompat.bytestr() intsead of str Differential Revision: https://phab.mercurial-scm.org/D3071 diff --git a/hgext/journal.py b/hgext/journal.py --- a/hgext/journal.py +++ b/hgext/journal.py @@ -226,7 +226,7 @@ class journalentry(collections.namedtupl def __bytes__(self): """bytes representation for storage""" - time = ' '.join(map(str, self.timestamp)) + time = ' '.join(map(pycompat.bytestr, self.timestamp)) oldhashes = ','.join([node.hex(hash) for hash in self.oldhashes]) newhashes = ','.join([node.hex(hash) for hash in self.newhashes]) return '\n'.join(( diff --git a/tests/test-arbitraryfilectx.t b/tests/test-arbitraryfilectx.t --- a/tests/test-arbitraryfilectx.t +++ b/tests/test-arbitraryfilectx.t @@ -2,13 +2,13 @@ Setup: $ cat > eval.py < from __future__ import absolute_import > import filecmp - > from mercurial import commands, context, registrar + > from mercurial import commands, context, pycompat, registrar > cmdtable = {} > command = registrar.command(cmdtable) > @command(b'eval', [], b'hg eval CMD') > def eval_(ui, repo, *cmds, **opts): > cmd = b" ".join(cmds) - > res = str(eval(cmd, globals(), locals())) + > res = pycompat.bytestr(eval(cmd, globals(), locals())) > ui.warn(b"%s" % res) > EOF