Missed Change on commit

Matt Mackall mpm at selenic.com
Thu Feb 15 14:26:47 CST 2007


On Thu, Feb 15, 2007 at 09:20:47PM +0100, Robin Farine wrote:
> On Thursday February 15 2007 20:08, Matt Mackall wrote:
> > On Thu, Feb 15, 2007 at 10:47:37AM -0700, Russell Suter wrote:
> > > Hi All,
> > >
> > > I have an example where a commit is missing a change.  I've
> > > attached a script and the output that (for me) always breaks. 
> > > Specifically, in the output the commit didn't pickup the branch
> > > 2 version 1 change:
> >
> > Mercurial can miss a change if the change happens so quickly that
> > it doesn't change the timestamp or the size that we recorded for
> > the file.
> 
> > Possible fixes:
> >
> > a) wait until the next second after recording dirstate
> >    this will catch any changes made after update but will
> > penalize everyone by a half second per add/merge/update...
> 
> Tried this, it becomes extremely painful to run the tests.
> 
> How about verifying each file with an mtime equal to the mtime of 
> the dirstate file itself? This would catch files changed in the 
> same second as the dirstate has been updated. Something like this:

I meant to include that in my list. What sort of time delta do tests
show?

Note that if it takes, say, 60 seconds to check out a tree with 20k
files, the last 300 or so will be in that last second. On average,
half of those 300 will be in the last partial second. So we'll take a
hit quite often.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list