SVN“无分支”文件
因此,我们正在逐步将所有项目从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
从 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
为了在项目之间共享代码,SVN 有 externals< /a>.
For sharing code between projects, SVN has externals.
您是对的,从这个意义上讲,没有办法进行文件共享。不过,您可能想考虑使用 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...
或者,您可以考虑使用 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. :-)