equal
deleted
inserted
replaced
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() |