撤销TFS合并积分 [英] Revoking TFS Merge Credits

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

问题描述

我了解到,当从BRANCHA> BRANCHB执行合并并在某些文件上选择保留目标"时,会导致TFS历史记录中的那些文件获得合并信用额":

I understand that when performing a merge from BRANCHA > BRANCHB and selecting "Keep Target" on some files will result in "Merge Credits" being granted to those files in TFS history: Merging Developement Branch to Main: There were no changes to merge

我们是否有办法撤消/擦除给定文件上的合并积分,从而有效地使我们的开发人员能够通过Source Control Explorer执行/force合并?

上下文:

每周,我们从BRANCHA> BRANCHB合并以同步并行工作.将记录所有具有未解决冲突的文件,并通知其所有者对A> B中的那些文件执行合并.然后,我们在这些文件上选择保留目标" –预计文件所有者将来会合并以解决悬而未决的冲突.我们正在将工作委托给各个所有者.

On a weekly basis, we merge from BRANCHA > BRANCHB to synchronize parallel efforts. Any files with unresolved conflicts are noted and their owners are notified to perform a merge on those files from A > B. We then select "Keep Target" on these files – anticipating a future merge by the file owner to resolve the pending conflict. We’re delegating the work out to the individual owners.

但这并不是很有效,因为TFS会发现初始合并已解决"了冲突(基于先前的合并历史而不是文件内容进行评估).

This doesn’t quite work though, because TFS will see that the initial merge has "resolved" the conflict (basing its evaluation on prior merge history, not file contents).

我希望使开发人员能够对这些文件执行重新合并,而不必强迫他们使用命令提示符和/force开关.

I want to enable developers to perform re-merges on these files without forcing them to use the command prompt and /force switch.

展望未来,我的计划是在签入分支>分支合并之前,对那些被选为保持目标"的未决变更进行撤消变更".这将使开发人员能够通过避开合并信用来独立执行合并.

Moving forward, my plan is to "Undo Changes" on those pending changes that were selected as "Keep Target" before checking in a branch>branch merge. This will enable the devs to perform the merges independently by dodging the merge credits.

但是回想起来,分支/强制合并会导致数百种冲突,我们希望将它们委派给所有者,作为同步两个分支的一种方式.执行经典合并不会报告这些内容,因为先前的合并具有保留目标".

But looking back, a branch<>branch /force merge results in hundreds of conflicts that we would like to delegate out to the owners as a means of syncing up two branches. Performing a classic merge reports nothing on these because prior merges have "Kept Target".

推荐答案

对于现在不想合并的特定文件,撤消合并确实更好,但是一旦选择了 keep目标,TFS确实记住了这一选择.

You're indeed better off undoing the merge for the specific files you don't want to merge right now, but once you've chosen keep target, TFS indeed remembers that choice.

如果您已经超出提交合并的要点,则有一种摆脱故障单的方法,那就是回滚合并.您可以为一组单个文件回滚合并.

If you're already past the point of committing the merge, there is a way to get rid of the ticket, and that is to roll back the merge. You can roll back the merge for a group of individual files.

这里的窍门如下:

  1. 在源代码管理资源管理器中查找每个文件和它们.
  2. 右键单击单个文件,然后从上下文菜单中选择 Rollback ... .
  3. 输入合并的变更集编号
  4. 重复1到3,直到列表中包含所有文件.
  5. 签入此补偿变更集.
  6. 尝试再次将Branch A合并到Branch B,您的候选更改将再次出现.
  1. Look up each file and them in the Source Control Explorer.
  2. Right-click the individual file and from the context menu choose to Rollback....
  3. Enter the changeset number of the merge
  4. Repeat 1 to 3 until you have all the file in your list.
  5. Check-in this compensating changeset.
  6. Try merging Branch A to Branch B again, your candidate changes should show up again.

您可以使用tf rollback(2015年之前)或tf vc rollback(-20215后)在命令行中执行相同的操作

You can do the same thing from the commandline, using tf rollback (pre-2015) or tf vc rollback (post-20215)

这篇关于撤销TFS合并积分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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