硬鏈接克隆了運行龜1.0 x64的版本一個Win7的X64框。關於烏龜揭示了它的1.0 「以水銀-1.5,Python的2.6.4,PyGTK的-2.16.0,GTK-2.18.7」。我還安裝了ActivePython 2.6和Mercurial 1.5 x64(通過Mercurial安裝程序從安裝,我的windows系統上都沒有硬鏈接克隆,我盒子上的驅動器也是NTFS,它支持硬鏈接)我如何獲得在Windows
在契稅,當我運行Python解釋器,並通過win32file API執行硬鏈接創建,它成功創建一個鏈接:
[email protected] C:\temp
> python
ActivePython 2.6.2.2 (ActiveState Software Inc.) based on
Python 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from win32file import *
>>> CreateHardLink('C:\\temp\\Mike2.txt','C:\\temp\\Mike.txt')
>>> ^Z
[email protected] C:\temp
> fsutil hardlink list Mike.txt
\temp\Mike.txt
\temp\Mike2.txt
但是,如果我用水銀克隆,我沒有得到相同的結果:
[email protected] C:\Users\mcaron
> which hg
C:\Program Files (x86)\Mercurial\\hg.EXE
[email protected] C:\temp
> hg status demo
[email protected] C:\temp
> hg log demo
changeset: 0:6db7092740d5
tag: tip
user: Michael Caron <[email protected]>
date: Wed Mar 24 16:08:38 2010 -0500
summary: first
[email protected] C:\temp
> hg clone demo demo2
updating to branch default
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
[email protected] C:\temp
> fsutil hardlink list .\demo\mike.prtprp
\temp\demo\mike.prtprp
[email protected] C:\temp
> fsutil hardlink list .\demo\mike1.prtprp
\temp\demo\mike1.prtprp
[email protected] C:\temp
> fsutil hardlink list .\demo\mike1_2.prtprp
\temp\demo\mike1_2.prtprp
[email protected] C:\temp
> fsutil hardlink list .\demo\mike2.prtprp
\temp\demo\mike2.prtprp
[email protected] C:\temp
> hg --version
Mercurial Distributed SCM (version 1.5)
Copyright (C) 2005-2010 Matt Mackall <[email protected]> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[email protected] C:\temp
> python -V
Python 2.6.2
是否有人正在使用或者是不支持克隆的Windows系統,與硬鏈接?我注意到TortoiseHg安裝程序帶有Python 2.6安裝。也注意到它有自己的Hg可執行文件(我也試過並得到相同的結果)。 TortoiseHg和Mercurial安裝是否會導致問題?
在使用硬鏈接克隆之前,回購必須是特定大小嗎? – 2010-03-26 14:25:05
nope,沒有檢查大小。 – tonfa 2010-03-26 15:19:57
回答這裏:http://kiln.stackexchange.com/questions/986/how-to-get-hardlink-cloning-on-windows – tonfa 2010-03-26 15:25:08