disappearing repo history on samba server

Adrian Buehlmann adrian at cadifra.com
Sat Dec 11 10:46:02 CST 2010

On 2010-12-08 11:54, Joel B. Mohler wrote:
> On 12/7/2010 6:09 PM, Adrian Buehlmann wrote:
>> Here is Joel's script (looks very interesting, combination of hardlink +
>> windows share + os.unlink !):
>>    import os
>>    import win32file
>>    dir,file=r"\\tcpkal\downloads","test_links.txt"
>>    f=os.path.join(dir,file)
>>    open(f,"w")
>>    win32file.CreateHardLink(f+".link",f)
>>    fd=open(f)
>>    raw_input("Try to delete the .link file now...")
>>    os.unlink(f+".link")
>>    fd.close()
> My current worry is that could actually be a samba issue as much as a 
> pywin32 issue.  If that's the case, I doubt it will be a wise investment 
> for me to follow through on.  I'll just lock down my linux server to 
> only allow http access to the repositories and fix my workflow (issues 
> noted above) to match that restriction.  ***However, it is my current 
> opinion that the introduction of the new checknlink code may actually be 
> a net regression for pushing to samba shares.  I have a guaranteed data 
> loss situation at this point where-as the 1.6.x and prior just failed 
> erratically. (some trade-off there :))!***

Confirmed and reproduced as documented in new issue2543:

  "os.unlink deletes wrong file on windows share served by Samba"


More information about the Mercurial-devel mailing list