comparison mercurial/changelog.py @ 8778:c5f36402daad

use new style classes
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 10 Jun 2009 15:10:21 +0200
parents c2ef478b2efa
children f193b643d1b1
comparison
equal deleted inserted replaced
8777:012be286b2c4 8778:c5f36402daad
34 def encodeextra(d): 34 def encodeextra(d):
35 # keys must be sorted to produce a deterministic changelog entry 35 # keys must be sorted to produce a deterministic changelog entry
36 items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)] 36 items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)]
37 return "\0".join(items) 37 return "\0".join(items)
38 38
39 class appender: 39 class appender(object):
40 '''the changelog index must be updated last on disk, so we use this class 40 '''the changelog index must be updated last on disk, so we use this class
41 to delay writes to it''' 41 to delay writes to it'''
42 def __init__(self, fp, buf): 42 def __init__(self, fp, buf):
43 self.data = buf 43 self.data = buf
44 self.fp = fp 44 self.fp = fp