TFS合并:无法放弃变更集 [英] TFS Merge: Cannot discard a changeset

查看:124
本文介绍了TFS合并:无法放弃变更集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个变更集,开发人员在其中签入了对源分支和目标分支的更改,许多更改包括两个分支中的重命名.变更集从源分支到目标分支的合并可以很好地进行,但是变更集仍保留在要合并的变更集列表中.

We have a changeset where the developer has checked in changes to both source and target branch, many changes including renames in both branches. The merge of the the changeset from source to target branch goes fine, but the changeset remains in the list of changesets to be merged.

当我现在再次尝试合并变更集时,它说没有要合并的变更".变更集仍保留在队列中.

When I now try to merge the changeset again, it says "There are noe changes to merge.". And the changeset remains in the queue.

我们尝试使用命令行工具来丢弃更改集,如下所示:

We have tried to use the command line tool to discard the changeset like this:

C:\ src \ project \ sourceBranch> tf merge/discard/recursive/version:C8137〜C8137 $/Project/sourceBranch $/ Project/targetBranch

C:\src\project\sourceBranch>tf merge /discard /recursive /version:C8137~C8137 $/Project/sourceBranch $/ Project/targetBranch

这没有帮助.我们也尝试过使用其他选项,例如/force和/baseless,但是没有运气.

This did not help. We have also tried using other options like /force and /baseless with no luck.

还有什么其他可能性可以消除合并候选者之间的变更集?

What other possibilities are there of getting rid of the changeset among the merge candidates?

推荐答案

好,所以基本上,您有一个变更集,其中的项目属于两个直接相关的分支.这样就可以使用变更集的部分变更集"子组件来合并此类变更集.

Ok, so basically you have a changeset with items that belong to two branches that are directly related. Which makes the merge of such changeset using the "partial changeset" subcomponent of the changeset.

让我用一种更好的方法进行解释:

Let me explain with a better way:

  • CS1234(您的变更集)
    • 分支A的部分CS1234A(例如源分支)
    • 分支B的部分CS1234B(说出目标)
    • CS1234 (your changeset)
      • Partial CS1234A for branch A (say the source branch)
      • Partial CS1234B for branch B (say the target)

      您进行了从A到B的合并,从而将CS1234A合并到B.

      You did a merge from A to B, which merged CS1234A to B.

      现在,当您尝试从A到B进行新合并时,您仍将CS1234作为候选对象,对吗?然后,如果选择它,则什么也不做,这是完全可以理解的,因为您已经合并了CS1234A和CS1234B不属于源分支(A).

      Now when you attempt a new merge still from A to B, you still have CS1234 as a candidate, right ? Then if you select it, nothing is done, which is totally understandable due to the fact you already merged CS1234A and CS1234B does not belong to the source branch (A).

      就像我已经遇到的TFS漏洞一样,我以为Microsoft用TFS 2010 RTM修复了它,显然不是.

      Looks like a bug from TFS to me that I already ran into, I thought Microsoft fixed it with the TFS 2010 RTM, apparently not.

      TFS基本上使您可以将CS1234作为候选对象,因为只有一部分被合并了,但是由于另一部分不能被合并,因此将它作为候选对象是没有意义的.

      Basically TFS gives you CS1234 as a candidate because only a partial part of it was merged, but as the other partial part can't be merge, it doesn't make sense to give it as a candidate.

      那又怎么样:

      您启动从B到A的合并(以相反的方式),是否将CS1234作为候选?我的假设是,如果您将CS1234从B合并到A,那么当您显示从A到B的候选者时,就不会再为这个变更集感到困扰.但是我不知道这是否是您愿意做的.

      You initiate a merge from B to A (in the reverse way), does CS1234 is given as a candidate ? My assumption is if you merge CS1234 from B to A then you won't be bother again with this changeset when you'll display the candidates from A to B. But I don't know if it's something you're willing to do.

      无论如何,您应该在 Microsoft Connect网站

      这篇关于TFS合并:无法放弃变更集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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