[Critical] dirstate format use OS file locking

John Whitley whitley at bangpath.org
Thu Mar 8 22:59:25 GMT 2007


Robert Collins wrote:
> (When taking a read lock, we can read the crc32 at the top, if its  
> the same,
> keep buffered and partial state if not, flush our state for the tree.)
[...]
> So on windows, you cannot replace an in-use file, and this very  
> scenario
> has the file in-use.

How are the read locks being taken (e.g. what methods in bzrlib and/ 
or Python lib?  I'll RTFS down from there..)  It may be possible with  
some jiggery-pokery (appropriate sharing flags on open and/or locking  
mechanisms) to make this work as desired on Windows.  If someone can  
point me in the right general direction in the code, I'll go off and  
do some footwork to see if my ideas on this have any merit.

-- John





More information about the bazaar mailing list