disappearing repo history on samba server

Joel B. Mohler jmohler at eshcom.com
Tue Dec 7 13:38:21 CST 2010

Hi,  My windows machines have been having a rocky relationship with 
their samba server.  The latest issue is that a push to a certain 
repository will wipe out revision history.  I've narrowed this down to a 
very small slice of mercurial code which has nothing at all to do with 
the changeset index, but the symptom with-in mercurial is that 
.hg\store\00changelog.i is renamed to .hg\store\00changelog.i.hgtmp and 
then my repository history is effectively wiped out (although the exact 
details of what goes on with 00changelog.i.hgtmp appear to vary somewhat 
by windows client machine).

The fatal bug is reproduced by the python script at
This script assumes that you have mercurial and python win32 extensions 
installed on a windows machine.  Without python win32 extensions, the 
windows link code goes into graceful (?) degradation mode and so the 
faulty code is not run.  The bug reproduces with two different windows 
machines (vista and server 2008) and two different linux servers (ubuntu 
and gentoo) so I'm quite confident it's not just a server configuration 

However, there's a weird gotcha which I don't understand yet.  It is 
that I can only reproduce this on a large repository of about 32000 
revisions which I can't make public.  Attempts on a smaller repository 
have all worked (i.e. reproducing the bug failed).  From my opener.py 
script, I come to the conclusion that for some reason 00changelog.i is 
held open longer for a larger repository, but I was unable to determine 
why that might be.

All relevant mercurial installs are at least 1.7.1 and I don't see any 
evidence that variations of revision beyond the arrival of the 
checknlink function make any difference.

So, two questions:
1)  Am I correct in believing that opener.py illustrates potential for a 
data-losing bug?
2)  Is more information needed about my repository or can a fix for 
opener.py be found with-out that?

Joel Mohler

More information about the Mercurial-devel mailing list