Commit Graph

12 Commits

Author SHA1 Message Date
Vadim Gelfer
09f8d99751 reduce memory used when appendfile appends to real file. 2006-05-09 11:08:06 -07:00
Thomas Arendsen Hein
571a43feca Always remove appendopener tmp files (fixes issue235).
test-hup triggered this bug by killing "hg serve --stdio".
2006-05-09 17:03:00 +02:00
Vadim Gelfer
75ddc9a984 merge with crew. 2006-05-02 14:37:55 -07:00
Vadim Gelfer
fad839fb0b fix file handling bugs on windows.
add util.posixfile class that has posix semantics on windows.
fix util.rename so it works with stupid windows delete semantics.
2006-05-02 14:30:00 -07:00
Thomas Arendsen Hein
092be2daa9 Use better names (hg-{usage}-{random}.{suffix}) for temporary files. 2006-04-30 21:11:22 +02:00
Vadim Gelfer
4d66e01617 remove appendfile data as soon as not needed. 2006-04-19 22:18:03 -07:00
Vadim Gelfer
15e922024b make appendfile simpler so it does not break with revlogng on windows.
it used to cache open files. this made revlogng break because it wants
to rename files when splitting .i into .i/.d, but cannot rename or unlink
open files on windows.

new code is bit slower, but safe on linux and windows. proper fix for
too many open/close of changelog/manifest belongs in different place.
can get 10% speed improvement back.
2006-04-19 08:33:46 -07:00
mason@suse.com
ccafb51c29 Additional appendfile fixes for interleaved data/index files
The appendfile code was not passing default version info to the
changelog or manifest classes, and so they were always being created
as version 0.

revlog.checkinlinesize had to be corrected to seek to the end
of the index file when no index file was passed (only clone does this)
2006-04-08 20:08:06 -04:00
mason@suse.com
f197c325c7 Make the appendfile class inline-data index friendly
The appendfile class needs a few changes to make it work with interleaved
index files.  It needs to support the tell() method, opening in a+ mode,
and it needs to delay the checkinlinesize call until after the
append file is written.

Given that open(file, "a+") doesn't always seek to the end of the file,
this adds seek operations to appendfile that understand whence args
2006-04-04 16:38:43 -04:00
Vadim Gelfer
a666e3186e 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.
2006-03-30 19:28:41 -08:00
Vadim Gelfer
6f9a8ca88b 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.
2006-03-27 08:31:33 -08:00
Vadim Gelfer
da16d78bcf forgot to add new module. 2006-03-24 09:23:11 -08:00