mercurial/changelog.py
changeset 7807 bd8f44638847
parent 7787 b8d750daadde
child 7948 de377b1a9a84
child 8424 c5b3d3e30de7
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()