如何在版本控制中的单个位置跨分支存储静态内容
[只是一个随机的想法]
我有一个 pdf 文档,当用户单击我网站上的“帮助”时会下载该文档。现在,这是一个相当大的文档,保存在版本控制 (SVN) 中,因此会为 SVN 中存在的所有分支进行复制。这是静态内容,开发人员不处理这些内容,并且不会经常更改。是否有一种更有效的方法来存储它(不会妨碍本地部署),使 SVN 签出和更新相对更快。
我知道我们得到的好处并不大,但这仍然是我想到的。
[Just a random thought]
I have a pdf doc that is downloaded when the user clicks on 'help' on my website. Now, this is a pretty huge document and is saved in version control (SVN) and is thus copied for all branches that exist in SVN. This is static content and something that developers are not working on, and does not change often. Is there a more efficient way to store it (that would not hamper local deployments) that would make SVN checkouts and updates relatively faster.
I know the benefit we get is not huge, this is something that came to my head none the less.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将 pdf 放在单独的目录中:
然后使用 SVN的外部机制
You can put your pdf in separate dir:
and then “mount” it to your working copies using SVN’s externals mechanism
我建议在 trunk 下创建以下结构
这意味着每个开发人员都可以像往常一样签出 trunk/src 进行分支(svn cp ^/trunk ^/branches/NEWBRNACH)等。如果您需要更改文档,只需签出 trunk/doc ...我更喜欢这样,因为该文档与您的项目相关,并且像源代码一样正在发生变化。
I would suggest to create the following structure under trunk
This means every developer can checkout trunk/src do branching as always (svn cp ^/trunk ^/branches/NEWBRNACH) etc. If you need to change the doc just checkout trunk/doc instead...I would prefer that, cause the doc is in relation with your project and is under change like the source code.