Missed Change on commit

Matt Mackall mpm at selenic.com
Thu Feb 15 13:08:27 CST 2007


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.

This situation mostly hits in test scripts, but could pop up wherever
there's automation.

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...
b) do a full check on files that match the current time but are
   unchanged in size
   this will catch 
      hg update; change ; hg status
   but not 
      hg up; change; sleep 1; status
   and if update takes less than a second, it will cause all files to
   be checked
c) backdate files 1 second at checkout time
   will confuse make
d) add a one second pause to scripts
d) use higher resolution timestamps

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list