push fails with tip
Thomas Arendsen Hein
thomas at intevation.de
Thu Mar 30 10:03:18 UTC 2006
* Vadim Gelfer <vadim.gelfer at gmail.com> [20060327 18:37]:
> On 3/27/06, Vadim Gelfer <vadim.gelfer at gmail.com> wrote:
> > sorry for problem. i tested race fix changes a lot before i pushed.
> > but i did not test on a mac.
>
> i found dual boot mac to test on.
>
> problem was simple. on linux, when file opened with mode 'a+', seek
> position is 0. on macos x, seek position is end of file. i think this
> is not documented.
I just had this problem with an unfixed Mercurial installation on Linux
(Python 2.4.2, Debian woody on x86, libc6 2.2.5-11.8).
After a pull 00changelog.i and .d were 0 bytes :-(
Maybe a Python or glibc bug that this sometimes is 0 and sometimes not?
stdio(3) even documents this behaviour:
If a file can support positioning requests (such as a disk file,
as opposed to a terminal) then a file position indicator
associated with the stream is positioned at the start of the
file (byte zero), unless the file is opened with append mode. If
append mode is used, the position indicator will be placed the
end-of-file.
So I think sharedfile behaves differently than normal files, because of:
def __init__(self, fp):
self.fp = fp
self.offset = 0
Shoudn't it be self.offset = fp.offset here?
(though this probably isn't a critical issue anymore)
Thomas
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
More information about the Mercurial
mailing list