与 Bazaar 并行开发分支
我有两个分支(或标签?),我需要在其中保留具有不同版本内容的相同文件结构。一个版本包含所有内容,例如开发脚本、配置文件等,而另一个版本仅包含重新分发的内容。
我如何使用 Bazaar 来实现这一目标?
I have two branches (or tags?) where I need to keep the same file structure with different versioned contents. One version contains everything, like development scripts, configuration files, etc. while the other contains only things that get redistributed.
How can I accomplish this using Bazaar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果代码库和将实际部署的文件集之间进行转换,您可以:
然后您可以设置绑定分支以确保集市远程部署服务器上的存储库反映了本地部署分支及其最新更新。
If the transformation between the code base and the set of files that will be actually deployed, you could:
Then you could setup a bound branch in order to make sure the bazaar repo on your remote deployment server reflect that local deployment branch with its latest updates.
所有版本控制系统都可以更好地处理收敛的分支。
一种方法是将“生产”分支从“开发”分支中分离出来,并且仅合并“开发->生产”方向上的更改。因此,所有私有配置文件仅保留在“生产”中。
然而,根据我的经验,从长远来看,这往往会相当痛苦,因为您将不可避免地想要将一些东西从生产合并到开发中。有很多方法可以做到这一点,但它们往往很烦人:它们涉及中间分支或向后移植更改。
更好的解决方案是将所有特定于生产的文件移出树,这样您就根本不必处理并行分歧的分支。无论 VCS 问题如何,这也是一个很好的设计实践。
All version control systems deal better with branches that converge.
One approach is to base "production" branch off the "development" branch, and only merge changes in the direction "development -> production". So all the private configurations files remain only in "production".
However, in my experience, that tends to be rather painful over the long term because you will inevitably want to merge some things from production to development. There are ways to do it, but they tend to be annoying: they involve either intermediate branches, or backporting changes.
A better solution is to move all the production-specific files out of the tree, so you don't have to deal with with parallel diverged branches at all. That's also a good design practice regardless of VCS concerns.