[PATCH 5 of 5] patch: invoke dirstate.dirtyifambig on changed file for safety
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu May 28 10:20:13 CDT 2015
At Wed, 27 May 2015 19:47:53 -0700,
Pierre-Yves David wrote:
>
>
>
> On 05/27/2015 10:03 AM, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1432745859 -32400
> > # Thu May 28 01:57:39 2015 +0900
> > # Node ID 0b360140869e72996260435940cfefb88a1e9cdc
> > # Parent 6d5d5a1d294d51f4a76cafec192278fd961047bf
> > patch: invoke dirstate.dirtyifambig on changed file for safety
> >
> > Patched file may be mis-recognized as clean by dirstate, if mode, size
> > and timestamp of it on the filesystem aren't changed.
> >
> > To avoid such ambiguous situation, this patch invokes
> > `dirstate.dirtyifambig()` on changed file in `workingbackend.setfile()`
> >
> > This should be executed explicitly, because `fsbackend.setfile()`
> > doesn't use `localrepository.wwrite()` to write data into the working
> > directory (probably, to avoid decoding file content).
>
> This series seems reasonable and a good step in the right direction. The
> code seems okay.
>
> However, this change of global state (dirstate) in the wwrite function
> will likely have serious issue with the worker system based on fork)
> that we use on linux (and mac os X?)
>
> Am I right?
Oh, I overlooked the race condition with worker !
I'll post revised version.
> --
> Pierre-Yves David
>
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list