Show More
@@ -59,11 +59,12 b' def stripdesc(desc):' | |||
|
59 | 59 | class appender(object): |
|
60 | 60 | '''the changelog index must be updated last on disk, so we use this class |
|
61 | 61 | to delay writes to it''' |
|
62 |
def __init__(self, |
|
|
62 | def __init__(self, vfs, name, mode, buf): | |
|
63 | 63 | self.data = buf |
|
64 | fp = vfs(name, mode) | |
|
64 | 65 | self.fp = fp |
|
65 | 66 | self.offset = fp.tell() |
|
66 |
self.size = |
|
|
67 | self.size = vfs.fstat(fp).st_size | |
|
67 | 68 | |
|
68 | 69 | def end(self): |
|
69 | 70 | return self.size + len("".join(self.data)) |
@@ -114,7 +115,7 b' def delayopener(opener, target, divert, ' | |||
|
114 | 115 | if divert: |
|
115 | 116 | return opener(name + ".a", mode.replace('a', 'w')) |
|
116 | 117 | # otherwise, divert to memory |
|
117 |
return appender(opener |
|
|
118 | return appender(opener, name, mode, buf) | |
|
118 | 119 | return o |
|
119 | 120 | |
|
120 | 121 | class changelog(revlog.revlog): |
General Comments 0
You need to be logged in to leave comments.
Login now