Fix inlined revlogs to seek to eof after opening "a+"
authormason@suse.com
Tue, 04 Apr 2006 16:38:44 -0400
changeset 2077 4d0700ae0991
parent 2076 d007df6daf8e
child 2078 441ea218414e
Fix inlined revlogs to seek to eof after opening "a+"
mercurial/revlog.py
--- 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