comparison mercurial/changelog.py @ 7807:bd8f44638847

help: miscellaneous language fixes
author timeless <timeless@gmail.com>
date Sat, 28 Feb 2009 12:38:45 +0100
parents b8d750daadde
children de377b1a9a84 c5b3d3e30de7
comparison
equal deleted inserted replaced
7806:6d0cf2a2acad 7807:bd8f44638847
22 # subset of the string_escape codec 22 # subset of the string_escape codec
23 text = text.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r') 23 text = text.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r')
24 return text.replace('\0', '\\0') 24 return text.replace('\0', '\\0')
25 25
26 class appender: 26 class appender:
27 '''the changelog index must be update last on disk, so we use this class 27 '''the changelog index must be updated last on disk, so we use this class
28 to delay writes to it''' 28 to delay writes to it'''
29 def __init__(self, fp, buf): 29 def __init__(self, fp, buf):
30 self.data = buf 30 self.data = buf
31 self.fp = fp 31 self.fp = fp
32 self.offset = fp.tell() 32 self.offset = fp.tell()