07 Jul 2007

Ran into an interesting thing a couple of days ago. It looks like mercurial suffers from a race condition wherein a size-preserving change made within the same second as the last hg command’s completion (or possibly the last time hg observed the file) will be ignored by hg.

This isn’t particularly bad for regular human users (as long as you don’t have your editor open while running commands in the background), but its pretty harsh for scripting users – size preserving changes are not *that* uncommon.

I’m immensely glad that we don’t have this race within bzr (even on FAT filesystems where you only get last-modified to within 2 seconds!)