是否有可能在TFS内“创建”(无基础)合并候选人?(Is it possible to “create” (baseless) merge candidates within TFS?)

编程入门 行业动态 更新时间:2024-10-11 15:16:37
是否有可能在TFS内“创建”(无基础)合并候选人?(Is it possible to “create” (baseless) merge candidates within TFS?)

在我工作的地方,我们有一个分支,它只用于检查正在进行的错误和任务。 这些小任务在下周签入时将被搁置并恢复。

我们开发了一个自动合并系统 ,其中这些小签到都合并到所有特定项目分支。 然后,在项目结束时,它反向合并到主分支,从而自动进入另一个项目分支。

但是,假设我有一个功能A的分支,另一个功能B。 我需要第三个,包括功能A +功能B +错误修复 。 我不想反向合并它们,因为我不想弄乱主分支(还)

我已经从功能A创建了一个分支,并启用了从“功能A”“功能A + B”的自动合并功能 。 所以每个bug修复都是这样的: Main - > Feature A - > Feature A + B. 并且功能A中的每个签入都会转到功能A + B.

现在我想进行从“功能B”到“功能A + B”的无基础合并。

有没有办法在它们之间进行合并(在TFS内)?

我知道它吹响了层次结构,我知道我可以通过tf.exe执行x baseless合并,或者手动(或使用任何已知工具)三路合并文件。

但是我不负责这样做,它是另一个习惯了Team Explorer界面的开发人员,所以这会让他的生活变得更轻松。

现在,现在,我知道可能的答案/评论将是:

你需要重新审视你的分支结构,因为出了什么问题!”

如果可能的话,请加上一些提示,我现在正试图改变它,但是当我们开发2个独立的项目时,我不知道该怎么做,这些项目突然之间需要整合在一起。

Here where I work we have a branch which is only used to check-in ongoing bugs and tasks. The small tasks are shelved and recovered in the next week, when they are checked-in.

We developed an auto-merge system where these small check-ins are all merged to all specific project Branches. Then, at the end of the project, it's reverse merged into the main branch, thus going automatically to another project branches.

But, suppose I have a branch with Feature A, and another with Feature B. I need a third, with both Feature A + Feature B + Bug Fixes. I don't want to reverse merge them as I don't want to mess up the main branch (yet)

I've created a branch from Feature A, and enabled my auto-merge from "Feature A" to "Feature A+B". So every bug fix goes this way: Main -> Feature A -> Feature A+B. And every checkin within Feature A goes to Feature A+B.

Now I want to do baseless merges from "Feature B" to "Feature A+B".

Is there a way to enable merging between them (within TFS) ?

I know it blows hierarchy up, and I know I can just perform x baseless merges through tf.exe, or three-way merge the files manually (or using any known tool).

But I'm not responsible for doing this, it's another developer who got used to the Team Explorer interface and all, so it would make his life easier.

Now, now, I know a probable answer/comment will be:

"You need to revisit your branch structure, as something is wrong!"

If possible, put that with some tips, I'm currently trying to change that but I'm not sure what to do when we develop 2 separated projects that, all of a sudden, need to be put together.

最满意答案

据我了解,一旦你使用tf merge /baseless在两个分支之间进行了无基础合并,TFS会记住这种关系,从那时起,任何用户都可以在两个分支之间“正常”执行合并。

问题在于,无基础合并可能会检测每个项目的冲突,并且您需要检查所有内容的新版本,以便在项目的分支之间创建关系。 因此,使用您的分支结构并在FeatureBFeature A + B之间进行无基本合并时,在解决冲突时必须非常小心 - 如果您只是选择目标版本,则目标分支上的任何FeatureA更改都将被FeatureB覆盖!

我应该补充一点,我没有完成这一切; 我有一个类似的场景,但当我意识到我需要详细解决每一个冲突时,我都会得到救助。 我们的产品很庞大,所以我们不值得花时间和风险。

As I understand it, once you have done a baseless merge between two branches using tf merge /baseless, TFS remembers this relation and from then on any user can perform a merge 'normally' between the two branches.

The catch is that the baseless merge probably will detect conflicts for every item, and you need to check in new versions of everything in order to create the relation between the branches for the items. So, using your branch structure and doing a baseless merge between FeatureB to Feature A+B, you must be very careful when solving the conflicts - if you simply select the target version, any FeatureA changes on the target branch will be overwritten with FeatureB!

I should add that I haven't done this all the way through; I had a similar scenario but bailed out when I realized that I needed to solve every conflict in detail. Our product is huge, so it wasn't worth the time and the risk for us.

更多推荐

本文发布于:2023-07-31 08:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1342487.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有可能   候选人   基础   TFS   candidates

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!