我有一个Win7 X64盒子运行乌龟1.0 x64。关于乌龟的表明,它是1.0“ Mercurial-1.5,Python-2.6.4,Pygtk-2.16.0,GTK-2.18.7”。我还安装了ActivePython 2.6和Mercurial 1.5 x64(通过Mercurial安装程序安装 64位安装程序. 。我的Windows盒子上都没有一个带有硬链接的克隆。我的盒子上的驱动器也是NTF,它支持硬链接。

在契据中,当我运行Python解释器并通过Win32file API执行硬链接创建时,它将成功创建一个链接:

me@pc 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

me@pc C:\temp
> fsutil hardlink list Mike.txt
\temp\Mike.txt
\temp\Mike2.txt

但是,如果我用墨西哥乳液来克隆,我将不会得到相同的结果:

me@pc C:\Users\mcaron
> which hg
C:\Program Files (x86)\Mercurial\\hg.EXE
me@pc C:\temp
> hg status demo
mcaron@DEV-MCARON-W64 C:\temp
> hg log demo
changeset:   0:6db7092740d5
tag:         tip
user:        Michael Caron <mcaron@solidworks.com>
date:        Wed Mar 24 16:08:38 2010 -0500
summary:     first

me@pc C:\temp
> hg clone demo demo2
updating to branch default
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
me@pc C:\temp
> fsutil hardlink list .\demo\mike.prtprp
\temp\demo\mike.prtprp
me@pc4 C:\temp
> fsutil hardlink list .\demo\mike1.prtprp
\temp\demo\mike1.prtprp
me@pc C:\temp
> fsutil hardlink list .\demo\mike1_2.prtprp
\temp\demo\mike1_2.prtprp
mme@pc C:\temp
> fsutil hardlink list .\demo\mike2.prtprp
\temp\demo\mike2.prtprp

me@pc4 C:\temp
> hg --version
Mercurial Distributed SCM (version 1.5)

Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> 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.
me@pc C:\temp
> python -V
Python 2.6.2

是否有人在使用使用硬链接的Windows上使用克隆或不支持它?我注意到Tortoisehg安装程序配有Python 2.6安装。还注意到它具有自己的HG可执行文件(我也尝试过并获得相同的结果)。乌龟和汞装置会引起问题吗?

有帮助吗?

解决方案

是的,您得到了答案:硬链接是在repo(.hg)而不是工作目录中。因此,如果您与 -U 您的克隆不占用其他磁盘。无工作的dir克隆是服务器端的绝佳选择,有时在台式机上也很有用。如果您忘记了-u,您总是可以摆脱仓库的工作dir hg update -r null 该更新为null修订版,该修订版早于任何文件的添加。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top