svn:除主干之外的分支之间的合并

发布于 2024-11-18 13:09:13 字数 204 浏览 3 评论 0原文

我们有一个 SVN 项目,其中有我工作的分支 B 和同事工作的分支 C。 (他主要在一个代码区域工作,而我主要在另一个区域工作)

如果我们希望在对主干进行任何合并之前保持同步,他和我应该如何合并?

我们在合并内容时没有任何问题,但是内容(特别是 svn:mergeinfo,出于明显的原因)不断显示树冲突并且总是给我们带来麻烦。

我们应该做什么?

We have a SVN project with branch B that I work on, and branch C, that a coworker works on. (he works primarily on one area of code and I work primarily on another)

How are he and I supposed to merge, if we wish to stay in sync prior to doing any merges to the trunk?

We don't have any problems merging content, but the content (particularly svn:mergeinfo, for obvious reasons) keeps displaying tree conflicts and always gives us trouble.

What should we do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

淡墨 2024-11-25 13:09:13

如果你们可以在同一个分支中工作,那么请考虑对一个分支进行所有更改的无根据合并,并放弃另一个分支。如果您的分支中有其他必须保持独立的更改,那么请仔细考虑仅挑选那些应该毫无根据地合并到单个分支的更改,然后在源分支中恢复这些更改。

结构(供参考):

  • 树干
    • 分支A
    • B 分支

流程将类似于以下内容:

  1. FI(前向集成)到两个子级的主干。 (将主干合并到分支A,然后将主干合并到分支B)。
  2. BA无基础合并
  3. 放弃B(至少锁定以防止意外使用退休分支)。
  4. FI 再次主干到 A(在引入进一步更改之前重新建立合并关系并消除任何合并冲突。
  5. 您和其他开发人员都继续在分支 A 中进行开发 直到稳定。
  6. FI 中继到 A(从其他开发人员或其他中继活动获取最新更改)
  7. 在 A 中快速构建并运行冒烟测试(确认 FI 成功)并且A仍然稳定)
    1. 如果在冒烟测试期间行李箱发生更多变化,则重复 6 和 6。 7 或可能锁上行李箱,直到完成步骤 6 - 8。
  8. RI(反向集成)A 到主干

IDEA:如果可能的话,避免将来必须在子分支之间共享不稳定的更改。毫无根据的合并和选择性更改都是比标准的完整父子合并风险更高的操作。一种方法是使用公共开发分支,然后仅在需要时按功能进行分支。所有开发人员都使用公共开发分支进行更改。当重大变更需要多个开发人员来构建和稳定时,创建功能分支。一旦稳定,集成回开发分支并退出功能分支。

If you can both work in the same branch then consider doing a baseless merge of all changes to one branch and abandon the other branch. If you have other changes in your branch that must remain separate then CAREFULLY consider cherry-picking just the changes that should be baseless merged to single branch, then revert those changes in the source branch.

Structure (for reference):

  • Trunk
    • Branch A
    • Branch B

Process would be something like the following:

  1. FI (Forward Integrate) Trunk to both children. (Merge Trunk to Branch A, then Trunk to Branch B).
  2. Baseless merge from B to A.
  3. Abandon B (at very least lock to prevent accidentally using retired branch).
  4. FI Trunk to A again (re-establishing merge relationship and ironing out any merge conflicts before further changes are introduced.
  5. Both you and other developer continue developing in branch A until stable.
  6. FI Trunk to A (pick up latest changes from other developers or other trunk activity)
  7. Quickly build and run smoke tests in A (confirm FI successful and A is still stable)
    1. If More changes to trunk occur during smoke test then repeat 6 & 7 or possibly lock trunk until steps 6 - 8 can be completed.
  8. RI (Reverse Integrate) A to Trunk

IDEA: If possible avoid having to share unstabilized changes between child branches in the future. Baseless merges and cherry-picking changes are both higher risk operations than standard full parent-child merges. One apprach is to use a common Development branch, then branch by feature only when needed. All developers use the common dev branch for changes. When breaking change needs multiple developers to build&stabilize create the feature branch. Once stabilized integrate back to Dev branch and retire the feature branch.

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