comparison hgext/journal.py @ 37318:9954d0e2ad00

py3: use pycompat.bytestr() intsead of str Differential Revision: https://phab.mercurial-scm.org/D3071
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 02 Apr 2018 17:06:42 +0530
parents a8a902d7176e
children dea771e63c3c
comparison
equal deleted inserted replaced
37317:14da486e820d 37318:9954d0e2ad00
224 (timestamp, tz), user, command, namespace, name, 224 (timestamp, tz), user, command, namespace, name,
225 oldhashes, newhashes) 225 oldhashes, newhashes)
226 226
227 def __bytes__(self): 227 def __bytes__(self):
228 """bytes representation for storage""" 228 """bytes representation for storage"""
229 time = ' '.join(map(str, self.timestamp)) 229 time = ' '.join(map(pycompat.bytestr, self.timestamp))
230 oldhashes = ','.join([node.hex(hash) for hash in self.oldhashes]) 230 oldhashes = ','.join([node.hex(hash) for hash in self.oldhashes])
231 newhashes = ','.join([node.hex(hash) for hash in self.newhashes]) 231 newhashes = ','.join([node.hex(hash) for hash in self.newhashes])
232 return '\n'.join(( 232 return '\n'.join((
233 time, self.user, self.command, self.namespace, self.name, 233 time, self.user, self.command, self.namespace, self.name,
234 oldhashes, newhashes)) 234 oldhashes, newhashes))