多个非连续变更集的无基础合并

问题描述:

我正在向TFS发出以下命令:

I'm issuing the following command to TFS:

>tf merge /baseless c:\ws\source c:\ws\target /recursive /version:C100~C100

但是我有一个大量需要合并的变更集。是否有快捷方式或某种指定列表的方法,例如:

But I have a large list of changesets that need to be merged. Is there a shortcut for this, or some way to specify a list, for example:

>tf merge /baseless c:\ws\source c:\ws\target /recursive /version:C100,C108,C110,C800,C1001,etc...


如果可以选择使用powershell,则以下脚本应有所帮助(未经测试!):

If powershell is an option, below script should help (not tested!):

$cslist = 1,23,45,456,568 #list of all changesets
foreach ($cs in $cslist) { & 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe' merge /baseless c:\ws\source c:\ws\target /recursive /version:C$cs }