changeset 2077:4d0700ae0991

Fix inlined revlogs to seek to eof after opening "a+"
author mason@suse.com
date Tue, 04 Apr 2006 16:38:44 -0400
parents d007df6daf8e
children 441ea218414e
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Tue Apr 04 16:38:44 2006 -0400
+++ b/mercurial/revlog.py	Tue Apr 04 16:38:44 2006 -0400
@@ -778,6 +778,7 @@
             f = self.opener(self.indexfile, "a")
         else:
             f = self.opener(self.indexfile, "a+")
+            f.seek(0, 2)
             transaction.add(self.indexfile, f.tell())
 
         if len(self.index) == 1 and self.version != 0:
@@ -908,6 +909,7 @@
             end = self.end(t)
 
         ifh = self.opener(self.indexfile, "a+")
+        ifh.seek(0, 2)
         transaction.add(self.indexfile, ifh.tell())
         if self.inlinedata():
             dfh = None