TFS 2010 源代码管理中的符号链接?

发布于 2024-11-13 07:08:57 字数 619 浏览 9 评论 0 原文

据我所知,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)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怪异←思 2024-11-20 07:08:57

此帖子是最近的(2010 年),关于 TFS 2008 和 2010:

TFS(2008 和 2010)不支持链接。 TFS 2010 有一个服务器端扩展(即 VS2010 用于门控签入的扩展),但这听起来像是客户端解决方案,因为链接必须转换为客户端 OM 可以识别的文件。

如果您只使用命令行,那么用于某些版本控制操作的包装器工具怎么样?例如,签入包装器会将链接转换为链接文本文件,并在执行正常签入之前添加或替换现有的链接文本文件。签出包装器将签出相应的链接文本文件。请注意,由于您必须包装许多命令,因此将会有相当多的工作。

This thread is more recent (2010), about TFS 2008 and 2010:

TFS (2008 and 2010) do not have support for links. There is a server-side extension for TFS 2010 (ie. what VS2010 used for gated checkin) but this sounds like a client-side solution since the link must be converted to a file to be recognized by the client OM.

If you only work with the command line, how about a wrapper tool for some version control operations? For example, the check-in wrapper would convert links to a linktext file and add or replace the existing linktext file before doing the normal check-in. The check-out wrapper would check-out the corresponding linktext file. Note that there will be quite a bit of work since you'll have to wrap many commands.

倦话 2024-11-20 07:08:57

对于基于 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.

想你的星星会说话 2024-11-20 07:08:57

不可能创建经典链接,但可以使用分支来实现类似的功能。您可以使用文件夹分支来制作类似于链接的内容。唯一的缺点是您仍然使用分支,因此有必要进行合并等。请参阅 此文档了解详细说明。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文