Mercurial > hg
changeset 2010:db1eb0de286a
fix appendfile problem on macos.
when i open file with mode 'a+' on linux, seek position is 0.
on macos seek position is end of file instead. not documented.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 27 Mar 2006 08:31:33 -0800 |
parents | 182f500805db |
children | b4df4687a78a 65634e1038dd 4c03bc02c779 |
files | mercurial/appendfile.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/appendfile.py Sun Mar 26 22:54:05 2006 +0200 +++ b/mercurial/appendfile.py Mon Mar 27 08:31:33 2006 -0800 @@ -37,7 +37,7 @@ fd, self.tmpname = tempfile.mkstemp() self.tmpfp = os.fdopen(fd, 'ab+') self.realfp = fp - self.offset = 0 + self.offset = fp.tell() # real file is not written by anyone else. cache its size so # seek and read can be fast. self.fpsize = os.fstat(fp.fileno()).st_size