Windows 7 x64 client, drive Y: on client is mapped to a CIFS/SMB share served by a Samba server running on a FreeBSD box. On the FreeBSD box: %uname -r 6.2-RELEASE %smbd -V Version 3.0.26a On the Windows 7 client in cmd.exe: $ cd Y:\ Current directory is empty: $ dir /w Volume in drive Y is adi Volume Serial Number is 0691-010D Directory of Y:\ [.] [..] 0 File(s) 0 bytes 2 Dir(s) 19'348'033'536 bytes free Create file a.txt using python: $ python Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from mercurial.windows import posixfile >>> fd = posixfile('a.txt', 'w') >>> fd.close() Create hardlinked a.link.txt, linked to a.txt: >>> from win32file import CreateHardLink >>> CreateHardLink('a.link.txt', 'a.txt') Open a.txt for reading: >>> fd = posixfile('a.txt') Delete a.link.txt and close handle on a.txt: >>> import os >>> os.unlink('a.link.txt') >>> fd.close() >>> exit() Now, file a.txt is gone (!) instead of a.link.txt (HORRIBLY WRONG): $ dir /w Volume in drive Y is adi Volume Serial Number is 0691-010D Directory of Y:\ [.] [..] a.link.txt 1 File(s) 0 bytes 2 Dir(s) 19'348'033'536 bytes free
See also the thread http://mercurial.markmail.org/thread/a734pihauca2bjmf "disappearing repo history on samba server" started Joel B. Mohler
The same use case works fine (no bug) if the share is served by a second Windows 7 x64 computer.
Bug reproduced with Windows 7 x64 client and a more recent Samba 3.4.7 running on Ubuntu 10.04 LTS (which was running in a VM)
Bug is also reproducible with Samba 3.5.4
Bug is also present with latest stable Samba 3.5.6 (compiled from source on Ubuntu 10.10 Maverick)
Submitted to the Samba BTS: https://bugzilla.samba.org/show_bug.cgi?id=7863
Uploaded client wireshark trace and server log to the Samba bugtracker (as requested there by Jeremy Allison)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:15 EDT --- This bug was previously known as _bug_ 2543 at http://mercurial.selenic.com/bts/issue2543
Bulk close: no activity for >2 years -> WONTFIX
Bulk change recent WONTFIX -> new, more descriptive ARCHIVED state (sorry for the spam)