svn 供应商分支 [英] svn vendor branch

查看:47
本文介绍了svn 供应商分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

svn red book中,在Vendor Branch"一章中,建议维护包含最新版本的 3rd 方产品的当前/,因此从示例中我们最终得到:

In the svn red book, in the chapter "Vendor Branch", it is proposed to maintain a current/ containing the latest release of 3rd party product, so from the example we end up with:

   repos/vendor/libcomplex/current - contains 1.1
   repos/vendor/libcomplex/1.0
   repos/vendor/libcomplex/1.1 

current/的目的是什么?为什么我们需要最初将新版本放到 current/中,然后才将 current/复制到版本专用目录(例如 1.1)中?

What is it purpose of current/? Why we need initially put a new version to current/ and only after that to copy current/ in a version dedicated directory (e.g. 1.1)?

我猜是为了:

  1. 使不同版本的 svn 具有可比性.
  2. 另一方面,版本以更有效的方式存储在 svn 存储库中.

我可以绕过供应商分支中的 current/处理吗?

Can I bypass handling of current/ in vendor branch?

更新:我不打算修补供应商代码(至少这是一个计划).所以我将使用 svn:external 来使用适当的供应商版本删除.

Update: I don't intend to patch the vendor code (at least this is a plan). So I'm going to use svn:external to use an appropriate vendor version drop.

推荐答案

该供应商分支管理方案的目的是将第 3 方产品的版本放入您的存储库,以便您在版本之间建立历史记录.如果你只是简单地将 release 1.0 导入到 repos/vendor/libcomplex/1.0 并将 release 1.1 导入到 repos/vendor/libcomplex/1.1,那么在 Subversion 之间的版本之间将没有历史记录1.0 和 1.1,并且您将无法在 Subversion 中查看 1.0 和 1.1 版本之间的更改.当然,您可以检查两者并使用 GNU diff 来比较它们,但在这种情况下您并没有利用 Subversion 的强大功能.

The intent of that vendor branch management scheme is to put the releases of the 3rd party product into your repository such that you establish a history between releases. If you simply import release 1.0 to repos/vendor/libcomplex/1.0 and import release 1.1 to repos/vendor/libcomplex/1.1, there will be no history in Subversion between releases 1.0 and 1.1, and you will not be able to view the changes between release 1.0 and 1.1 in Subversion. Sure, you can checkout both and use GNU diff to compare them, but you are not taking advantage of the power of Subversion in that case.

如果您正在创建自己的分支并希望将 1.0 和 1.1 之间的更改合并到您的分支中,那么历史记录很重要.如果您希望查看版本 1.0 和 1.1 之间 Subversion 中的更改,历史记录也是导入的.最后,历史记录可以更有效地存储数据,因为只存储 1.0 和 1.1 之间的增量.

The history is important if you are creating your own branch and wish to merge the changes between 1.0 and 1.1 into your branch. The history is also import if you wish to view the changes in Subversion between releases 1.0 and 1.1. Finally, having a history results in a more efficient storage of the data, because only the delta between 1.0 and 1.1 is stored.

通过将 1.0 版导入到 repos/vendor/libcomplex/current,然后将 1.1 版添加到同一目录,您可以在 1.0 和 1.1 之间建立历史记录.

By importing release 1.0 to repos/vendor/libcomplex/current and then adding release 1.1 to that same directory, you establish a history between 1.0 and 1.1.

这篇关于svn 供应商分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆