work around python bug on solaris 10.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Thu, 30 Mar 2006 19:28:41 -0800
changeset 2027 94d3170399e1
parent 2026 24c604628867
child 2028 1f1fc418a96c
work around python bug on solaris 10. write to file opened mode 'a+' should write to end of file and update offset pointer, but does not (solaris 10 has python 2.3.3). fix is to always seek.
mercurial/appendfile.py
--- a/mercurial/appendfile.py	Thu Mar 30 18:35:52 2006 -0800
+++ b/mercurial/appendfile.py	Thu Mar 30 19:28:41 2006 -0800
@@ -70,6 +70,7 @@
 
     def write(self, s):
         '''append to temp file.'''
+        self.tmpfp.seek(0, 2)
         self.tmpfp.write(s)
         # all writes are appends, so offset must go to end of file.
         self.offset = self.fpsize + self.tmpfp.tell()