##// END OF EJS Templates
py3: replace __str__ to __bytes__ in hgext/journal.py...
Pulkit Goyal -
r36684:d79d68bb default
parent child Browse files
Show More
@@ -24,6 +24,7 b' from mercurial import ('
24 24 bookmarks,
25 25 cmdutil,
26 26 dispatch,
27 encoding,
27 28 error,
28 29 extensions,
29 30 hg,
@@ -219,8 +220,8 b' class journalentry(collections.namedtupl'
219 220 (timestamp, tz), user, command, namespace, name,
220 221 oldhashes, newhashes)
221 222
222 def __str__(self):
223 """String representation for storage"""
223 def __bytes__(self):
224 """bytes representation for storage"""
224 225 time = ' '.join(map(str, self.timestamp))
225 226 oldhashes = ','.join([node.hex(hash) for hash in self.oldhashes])
226 227 newhashes = ','.join([node.hex(hash) for hash in self.newhashes])
@@ -228,6 +229,8 b' class journalentry(collections.namedtupl'
228 229 time, self.user, self.command, self.namespace, self.name,
229 230 oldhashes, newhashes))
230 231
232 __str__ = encoding.strmethod(__bytes__)
233
231 234 class journalstorage(object):
232 235 """Storage for journal entries
233 236
General Comments 0
You need to be logged in to leave comments. Login now