How to block a changeset from merging in TFS?

眉间皱痕 提交于 2019-12-20 12:09:52

问题


In TFS 2010, how can one mark a changeset so that it cannot be merged from one branch to another? For example, so it doesn't show in the "merge wizard" in Visual Studio when using the "Selected changesets" option. Basically, I want it to look like the changeset in question has already been merged into another branch.

Our build process auto-increments the version numbers in all our AssemblyInfo.cs files. A changeset in a release branch that contains only version increments should not be merged into trunk (or another release branch, of course).

I believe this is analogous to the "Only record the merge (block revisions from getting merged)" checkbox in TortoiseSVN.


回答1:


I think I found the answer to my question. The tf.exe command has a switch "/discard" which is documented as "Does not perform the merge operation, but updates the merge history to track that the merge occurred." This is exactly what I was looking for. I'll try it and post an update if this not what I'm expecting.

http://msdn.microsoft.com/en-us/library/bd6dxhfy(v=vs.80).aspx




回答2:


There's really not an analog in TFS for what you're trying to accomplish. Within TFS each subsequent changeset for a file is a delta off the previous changeset (and so on down to the base revision). Therefore, you can't really "skip" a changeset.

I'm not sure exactly what you mean by "version increments" in this situation. Are you talking about file/assembly version, or something else?



来源:https://stackoverflow.com/questions/4024919/how-to-block-a-changeset-from-merging-in-tfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!