[PATCH 2 of 2] Reorder rename operations to minimise risk of leaving repository in unknown state

Sune Foldager cryo at cyanite.org
Fri Oct 2 07:48:45 CDT 2009


Adrian wrote:

> The creators and contributors of/to Mercurial have already invested
> at lot of time and energy to adapt to the numerous extra quirks the
> Windows platform is presenting. But having to work around processes
> that hard-lock Mercurial's private files at random times is really
> asking for taking this to new heights (or, rather, lows in this case).

I agree; if someone opens the file without FILE_SHARE_WRITE and FILE_SHARE_DELETE modes, there is really nothing much we can do. We can at most take some efforts to make corruptions less likely, but nothing can guarentee that it won't happen. However, as long as virus scanners open with proper share modes, things should be fine with the present rename code.

We haven't had an issue here since the new code was put in place, and we had several issues before that, on a weekly basis. Everyone (>100 people) here runs (the same) virus scanners.

Why scanner wouldn't open with share modes is beyond me, but if you let them know it should be as easy as pie for them to implement it; they just need to set a flag.

/Sune





More information about the Mercurial-devel mailing list