与 Bazaar 并行开发分支

发布于 2024-09-03 20:21:27 字数 115 浏览 2 评论 0原文

我有两个分支(或标签?),我需要在其中保留具有不同版本内容的相同文件结构。一个版本包含所有内容,例如开发脚本、配置文件等,而另一个版本仅包含重新分发的内容。

我如何使用 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 技术交流群。

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

发布评论

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

评论(2

梦情居士 2024-09-10 20:21:27

如果代码库和将实际部署的文件集之间进行转换,您可以:

然后您可以设置绑定分支以确保集市远程部署服务器上的存储库反映了本地部署分支及其最新更新。

If the transformation between the code base and the set of files that will be actually deployed, you could:

  • setup a branch
  • merge your dev branch in that branch
  • only remove the extra files through a script

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.

网白 2024-09-10 20:21:27

所有版本控制系统都可以更好地处理收敛的分支。

一种方法是将“生产”分支从“开发”分支中分离出来,并且仅合并“开发->生产”方向上的更改。因此,所有私有配置文件仅保留在“生产”中。

然而,根据我的经验,从长远来看,这往往会相当痛苦,因为您将不可避免地想要将一些东西从生产合并到开发中。有很多方法可以做到这一点,但它们往往很烦人:它们涉及中间分支或向后移植更改。

更好的解决方案是将所有特定于生产的文件移出树,这样您就根本不必处理并行分歧的分支。无论 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.

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