views:

486

answers:

1

I am using Mercurial under Windows XP (using the TortoiseHg distribution) and I want to use NTFS hardlinks when cloning a repository. Out of the box Mercurial does not do this. I have read that a win32file python extension needs to be enabled. So far I have been unsuccessful in making this work (adding a win32file entry to the extensions section in mercurial.ini does not seem to work). Is there a simple way to enable it?

A: 

I think you'll need to install full Python and use the Mercurial source install. While TortiseHG's py2exe-compiled installation of Mercurial can load mercurial extensions just fine, it's my understanding that it won't let you swap out core python modules.

Ry4an
What do you mean by "full Python" ? Does ActivePython work, or do we need to download Python source, build and install in that way? ActivePython comes with win32file and I see the CreateHardLink function in that library.
Mike Caron
Also, UpgradeNotes on Mercurial wiki says: "0.7: Windows hardlink cloning - As of 0.7, hardlink cloning is now supported on Windows with NTFS and ActiveState Python. Because old versions cannot properly determine the link count of hardlinked files, using old versions of Mercurial on a new repository containing hardlinks may be dangerous." So if one has version > 0.7, should be ok.
Mike Caron