SVN“无分支”文件

发布于 2024-08-07 00:42:19 字数 484 浏览 3 评论 0原文

因此,我们正在逐步将所有项目从 CVS 转移到 SVN。

特别是一个项目有两个并行的开发流,它们共享大量代码,并且它们通过分支标签上的巧妙技巧来实现这一目标。

有些文件在不同的流上发散时会正常分支:

foo.c

  • 1.18         --- HEAD,VERSION-1-BRANCH
  • 1.15.2.10 --- VERSION-2-BRANCH

其他在分支之间没有区别,并且在分支之间“共享”。任何更新都会自动包含在两个分支中:

bar.c

  • 1.25 --- HEAD, VERSION-1-BRANCH, VERSION-2-BRANCH

据我所知,没有办法完成同样的任务subversion 中的分支在逐个文件的基础上“链接”。有人请告诉我事实并非如此吗?

So we're gradually moving all our projects across into SVN, from CVS.

One project in particular has two parallel development streams that share a lot of code, and they accomplish this with a neat trick on branch tags.

Some files are branched normally as they diverge on the different streams:

foo.c

  • 1.18         --- HEAD, VERSION-1-BRANCH
  • 1.15.2.10 --- VERSION-2-BRANCH

Others don't differ between the branches, and are 'shared' between the branches. Any updates automatically get included in both branches:

bar.c

  • 1.25 --- HEAD, VERSION-1-BRANCH, VERSION-2-BRANCH

As far as I can see, there's no way to accomplish this same 'linking' of branches in subversion, on a file-by-file basis. Someone please tell me it isn't so?

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

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

发布评论

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

评论(4

毁梦 2024-08-14 00:42:19

从 Subversion 1.6 开始,在文件级别支持 svn:externals 属性。在以前的版本中,它仅在目录基础上工作

Since Subversion 1.6 there has been support for the svn:externals property at a file level. In previous versions it only worked on a directory basis

合约呢 2024-08-14 00:42:19

为了在项目之间共享代码,SVN 有 externals< /a>.

For sharing code between projects, SVN has externals.

﹎☆浅夏丿初晴 2024-08-14 00:42:19

您是对的,从这个意义上讲,没有办法进行文件共享。不过,您可能想考虑使用 svn:externals 。但这需要您将源代码拆分到单独的目录中......

You are correct in that there is no way to do file sharing in this sense. You might want to look into using svn:externals though. This would require that you split the source into separate directories though...

梦回旧景 2024-08-14 00:42:19

或者,您可以考虑使用 svn:externals。

抱歉,我不确定前面三张海报是否同时按下了回车键,或者房间里是否有严重的回声。 :-)

Alternatively, you could consider using svn:externals.

Sorry, I'm not sure if the previous three posters all hit the enter key at the same time or if there's a serious echo in the room. :-)

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