据我所知,Team Foundation Server 2010 的源代码管理(和之前的版本)不支持文件链接(符号链接)。
链接(根据 Visual SourceSafe)的概念是在文件夹中提供一个“硬”文件,然后在其他位置“链接”到该文件 - 与文件系统硬链接的设计完全相同。
有谁知道文件是否可以链接?我意识到这通常不是一个好的做法,但在某些情况下它是有意义的。
根据此线程中的答案: 链接 TFS 源代码管理文件夹另一个 TFS 项目 这是不可能的,但我找不到明确的答案。
我能找到的最接近 Google 的内容是 MSDN 论坛,但它已经很老了(2006 年)。我几乎假设这仍然是答案(除非有人知道不同)?
As far as I know, Team Foundation Server 2010's source control (and prior versions) doesn't support linking (Symbolic links) of files.
Linking (per Visual SourceSafe) was the concept of providing one "hard" file in a folder, and then "linking" to it in other locations - exactly like file system hard links are designed.
Does anyone know if files can be linked at all? I realise it is not a good practice in general, but I have some scenarios where it makes sense.
According to an answer in this thread: Linking TFS source control folder from another TFS project it's not possible, but I can't find a definitive answer.
Closest thing I can find courtesy of Google is a thread on the MSDN forum but it's quite old (2006). I'm pretty much assuming that this is still the answer though (unless anyone knows differently)?
发布评论
评论(3)
此帖子是最近的(2010 年),关于 TFS 2008 和 2010:
This thread is more recent (2010), about TFS 2008 and 2010:
对于基于 Linux 的系统,似乎有一个解决方法。
本页 - 将 Unix 文件系统属性应用于版本控制下的文件 - 描述如何使用
.tpattributes
文件文本文件来存储有关文件属性的详细信息。本文适用于 Visual Studio 2010 版本。该过程如下所述:如何在 Linux/Unix 和 TFS 下使用符号链接文件?。它涉及使用
.tpattributes
文件和表示符号链接的 0 字节文件。已经有 根据对 Microsoft 要求在 TFS 2015 中实现此功能的更新请求的评论,一些成功的报告。
在 Perforce 中,符号链接可能只需签入,而无需执行任何此操作。
There seems to be a work-around for this for Linux-based systems.
This page - Applying Unix Filesystem Attributes to Files under Version Control - describes how to use a
.tpattributes
file text file to store details about file attributes. The article applies to the Visual Studio 2010 edition.The process is described here: How to work with symbolic link files under Linux/Unix and TFS?. It involves the use of both a
.tpattributes
file, and a 0-byte file representing the symlink.There have been some reports of success for this, according to the comments on an updated request to Microsoft for this feature to be implemented in TFS 2015.
In Perforce, symlinks may just be checked-in without having to go through any of this.
不可能创建经典链接,但可以使用分支来实现类似的功能。您可以使用文件夹分支来制作类似于链接的内容。唯一的缺点是您仍然使用分支,因此有必要进行合并等。请参阅 此文档了解详细说明。
It's not possible to make classical links, but it's possible to use branches for simmilar functionality. You can use a branch over folder to make something simmilar as were links. The only drawback is that you still work with branches, so it's necessary to do merges etc. See section "Source Code Sharing" of this document for detailed instructions.