[PATCH 3 of 3] commit: avoid a dirstate race with multiple commits in the same process

Greg Ward greg at gerg.ca
Thu Mar 17 20:41:41 CDT 2011

On 17 March 2011, Matt Mackall said:
> On Thu, 2011-03-17 at 09:10 -0400, Greg Ward wrote:
> > So then I thought about putting _lastnormal entirely under the control
> > of status().  But status() only looks at a subset of the dirstate, so
> > it cannot create a definitive _lastnormal list.  I'm not sure how much
> > this matters.
> > 
> > Maybe I'm barking up the wrong method.  Perhaps normal() should be
> > responsible for building up the list of "files last asserted to be in
> > state normal", which then affects the behaviour of status() on those
> > files.  Hmmmmm.
> You're in danger of becoming an expert. This is more or less what I
> expected:

Oh crap.  That wasn't the plan.  What next, answering questions and
reviewing newbie patches?  *sigh*

Anyways, to my pleasant surprise, the patch worked out out pretty much
as you said, and it's much smaller and less invasive.  No refactoring,
no icky temp files just to get the current time.  I just sent it.
Further discussion can follow that message.

Greg Ward                                http://www.gerg.ca/
And now for something completely different.

More information about the Mercurial-devel mailing list