# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1493266797 -19800 # Node ID 964e7427a691188063f0b268343d487362e1659d # Parent e37fd5be0fedb1004fb3f02c94aa8c8f8e6c6651 py3: use pycompat.bytestr() instead of str() This is because str() on python 3 return unicodes diff -r e37fd5be0fed -r 964e7427a691 mercurial/templatefilters.py --- a/mercurial/templatefilters.py Thu Apr 20 19:51:37 2017 +0530 +++ b/mercurial/templatefilters.py Thu Apr 27 09:49:57 2017 +0530 @@ -230,7 +230,7 @@ elif obj is True: return 'true' elif isinstance(obj, (int, long, float)): - return str(obj) + return pycompat.bytestr(obj) elif isinstance(obj, str): return '"%s"' % encoding.jsonescape(obj, paranoid=paranoid) elif util.safehasattr(obj, 'keys'): @@ -359,7 +359,7 @@ return "".join([stringify(t) for t in thing if t is not None]) if thing is None: return "" - return str(thing) + return pycompat.bytestr(thing) @templatefilter('stripdir') def stripdir(text):