如何使用新的 SVN 合并跟踪? [英] How do I use the new SVN merge-tracking?

查看:51
本文介绍了如何使用新的 SVN 合并跟踪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我现有的(SVN 1.5 之前的)合并策略中,我们在分支创建时创建了 Trunk(称为 BasePoint)的副本,以便稍后在合并期间引用.

In my existing (Pre-SVN 1.5) merge strategy, we create a copy of the Trunk (called BasePoint) at the moment of branch-creation for referencing later during the merge.

当我们需要将一个分支合并回主干时,我们执行 2 个操作.

When we need to merge a branch back into the trunk, we perform 2 operations.

  1. 从 BasePoint 合并到 LatestTrunk(Trunk 可能从原始分支开始移动)到 Branch 的工作副本,然后提交.

  1. Merge from BasePoint to LatestTrunk (Trunk has likely moved on since the original branch) into Working copy of Branch and then commit.

此时我们通常会检查合并到分支是否没有损坏任何东西

At this point we typically check that the merge into the branch has not damaged anything

从LatestTrunk 合并到LatestBranch 回到主干的工作副本,然后提交.

Merge from LatestTrunk to LatestBranch back into Working copy of trunk and then commit.

文档表明我在 Trunk 和 Merge from the Branch 上使用了新的 reintegrate merge.

Documentation suggests that I use the new reintegrate merge on the Trunk and Merge from the Branch.

我是否需要先从主干合并到开发分支,或者这是否包含在新的重新集成选项中?

换句话说,新的 merge --reintegrate 功能是代表我之前的每个合并"还是整个操作"?

To put it another way, does the new merge --reintegrate functionality represent 'each of my previous merges' or 'the whole operation' ?

(FWIW 我使用的是 TortoiseSVN 1.5.1)

(FWIW I am using TortoiseSVN 1.5.1)

推荐答案

简短的回答是,您仍然必须执行两个步骤.

SVN 书籍 解释合并过程为:

  1. svn merge http://trunk/path 在分支工作副本中
  2. svn merge --reintegrate http://branch/path 在主干工作副本中
  1. svn merge http://trunk/path while in a branch working copy
  2. svn merge --reintegrate http://branch/path while in a trunk working copy

请注意缺少修订号.这可能不是一个巨大的胜利.新的酷炫之处在于能够在您在分支中编码时重新运行合并,使您能够根据主干中的更改保持分支最新(无需手动记录修订号!).SVN 会跟踪需要从主干合并的内容以及分支独有的更改.完成分支后,--reintegrate 使用该数据自动仅将分支更改合并回主干.

Notice the lack of revision numbers. This probably doesn't feel like a huge win. The new coolness is the ability to re-run the merge as you are coding in your branch, allowing you to keep the branch up to date with changes in trunk (without recording revision numbers by hand!). SVN keeps track of what needs to be merged in from trunk and what changes are unique to the branch. When you are done with the branch, --reintegrate uses that data to automatically merge only the branch changes back to trunk.

这篇关于如何使用新的 SVN 合并跟踪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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