如何在 Subversion 存储库中创建别名(或快捷方式或符号链接)?

发布于 2024-09-16 07:50:14 字数 156 浏览 3 评论 0原文

假设我的 svn 存储库中有一个“releases”子目录,其中有该项目的多个版本。我想要一个“latestRelease”别名,它将指向当前版本。有没有办法做到这一点,而不实际复制最新的发行分支?

我不是在谈论检查 svn 中的符号链接。本质上,我正在讨论在存储库中创建符号链接。

Let's say I have a "releases" subdirectory in my svn repository, where I have multiple releases of the project. I would like to have a "latestRelease" alias, which would point to whatever the current release is. Is there any way to do this, without actually copying the latest release branch?

I am not talking about checking symbolic links into svn. Essentially, I am talking about creating symbolic links inside the repository.

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

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

发布评论

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

评论(3

浪漫之都 2024-09-23 07:50:14

您可以在 SVN 中很好地提交符号链接。但这里的问题是它们不能在 Windows 上运行(显然)。 SVN 存储库本身不存储符号链接,而是将符号链接存储为版本化文件,其内容指向符号链接所在的路径,并且还使用 svn:special 属性让 svn 客户端可能需要使用它进行特殊操作(例如将其转换回符号链接)。

来自 collabnet 的此链接有更多详细信息: http:// help.collab.net/index.jsp?topic=/faq/symlinks.html

另外,在 svn 的 /releases 目录中,您应该考虑根据您的版本号来制作您的版本的“标签”。应用程序使得查找最新数据就像比较数字一样简单。

并在某种程度上相关的说明:除非您已经使用 /tags 目录作为用户标签并为与版本相关的标签保留 /releases ,否则我建议坚持约定并使用顶级 /tags 目录来表示您正在谈论的内容关于。

You can commit symbolic links just fine in SVN. The problem here however is that they won't work on Windows (obviously). The SVN repository itself doesn't store symlinks but rather stores the symlink as a versioned file whose contents point to the path the symlink was made to and also uses the svn:special property to let svn clients they may need to something special with it (e.g. convert it back to a symlink).

This link from collabnet has a small bit more detail: http://help.collab.net/index.jsp?topic=/faq/symlinks.html

Additionally, in your /releases directory in svn, you should consider making your "tags" of your releases based on the version number of your application such that finding the latest is as trivial as comparing numbers.

And on an somewhat related note: unless you are already using a /tags directory for user tags and reserving /releases for tags related to releases, I'd recommend to stick to convention and use a top level /tags directory for what you are talking about.

东风软 2024-09-23 07:50:14

我们为此使用标签;只需在发布新版本时更新标签即可。

svn:externals 是另一种可能性,尽管它们通常用于引用外部源(例如您正在使用的库),但它们会起作用,尽管我认为您必须使用挂钩修订版来选择您想要引用的特定修订版。

您还可以创建“lastestRelease”分支,然后在发布版本时将所有内容合并到该分支。

3 种方法可以满足您的需求 - 选择哪一种取决于您:)

We use tags for this; just update the tag when you do a new release.

svn:externals are another possibility, though those are usually used to reference external sources (like libraries you're using), they will work though I think you'll have to use the peg revision to pick a particular revision you want to reference.

You could also make 'lastestRelease' branch and then merge everything over to it whenever you do a release.

3 ways to do what you want - choosing one is up to you :)

蓝颜夕 2024-09-23 07:50:14

您可以为此使用 svn:externals。

You can use a svn:externals for this.

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