dirstate2 comments

Martin (gzlist) gzlist at googlemail.com
Mon May 31 15:03:05 BST 2010


On 31/05/2010, Alexander Belchenko <bialix at ukr.net> wrote:
> Martin Pool пишет:
>>  * however, we also cannot count on being able to
>> delete/rename/overwrite a file while it's being read (because this
>> doesn't work on windows)
>
> Hmm, I'm not sure but I was under impression that using Win32 API it's
> possible to open the file in shared mode and allow simultaneous read and
> rename/delete. I might be wrong of course, but I saw something similar
> implemented in hg sources. Maybe somebody like Martin gz can look on
> this with suspicious eye?

Ha, yes, I thought we'd discussed this before:
<https://lists.ubuntu.com/archives/bazaar/2009q3/062748.html>

It's not the same thing as nix file handing in that it remains in the
namespace until all handles are closed, so you still can't rename over
a live file.

Every time this topic has come up I've wanted to mention NTFS
transactions, which seem like The Right Way of doing this sort of
thing on modern windows systems, but I don't actually know anything
about them (or have a new enough OS).

Martin



More information about the bazaar mailing list