【发布时间】:2011-02-01 04:32:38
【问题描述】:
我有一个运行 Tortoise 1.0 x64 版本的 Win7 x64 机器。 About Tortoise 透露它是 1.0“与 Mercurial-1.5、Python-2.6.4、PyGTK-2.16.0、GTK-2.18.7”。我还安装了 ActivePython 2.6 和 Mercurial 1.5 x64(通过 the 64-bit installer 的 Mercurial 安装程序安装。在我的 Windows 盒子上没有一个带有硬链接的克隆。我盒子上的驱动器也是支持硬链接的 NTFS。
事实上,当我运行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
但是,如果我使用 Mercurial 进行克隆,我不会得到相同的结果:
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 可执行文件(我也尝试过并得到相同的结果)。 TortoiseHg 和 Mercurial 安装是否会导致问题?
【问题讨论】:
-
在使用硬链接克隆之前,repo 是否也必须具有一定的大小?
-
不,没有尺寸检查。
标签: mercurial clone tortoisehg hardlink