##// END OF EJS Templates
transaction: fix __repr__() and make the default name bytes...
Matt Harbison -
r51761:0a4efb65 stable
parent child Browse files
Show More
@@ -16,6 +16,7 b' import os'
16 16
17 17 from .i18n import _
18 18 from . import (
19 encoding,
19 20 error,
20 21 pycompat,
21 22 util,
@@ -229,7 +230,7 b' class transaction(util.transactional):'
229 230 validator=None,
230 231 releasefn=None,
231 232 checkambigfiles=None,
232 name='<unnamed>',
233 name=b'<unnamed>',
233 234 ):
234 235 """Begin a new transaction
235 236
@@ -318,7 +319,7 b' class transaction(util.transactional):'
318 319 def __repr__(self):
319 320 name = b'/'.join(self._names)
320 321 return '<transaction name=%s, count=%d, usages=%d>' % (
321 name,
322 encoding.strfromlocal(name),
322 323 self._count,
323 324 self._usages,
324 325 )
@@ -574,7 +575,7 b' class transaction(util.transactional):'
574 575 self._file.flush()
575 576
576 577 @active
577 def nest(self, name='<unnamed>'):
578 def nest(self, name=b'<unnamed>'):
578 579 self._count += 1
579 580 self._usages += 1
580 581 self._names.append(name)
General Comments 0
You need to be logged in to leave comments. Login now