Show all changesets between two labels

限于喜欢 提交于 2019-11-27 07:54:24

问题


In TFS2010 each build is associated with a label by the build server.

Our SCM management wants to see all the changesets and related workitems between two labels. Mostly those labels are builds that have a build quality "Released". This way all changes between two delivered builds can be reported.

How is this done in TFS 2010 ?


回答1:


I don't think you want to use the label, I think you want to use the date/time of the build(s). Labels are easily mutable and don't necessarily represent a point in time. Assuming you have the datetimes of the builds, you can use the TF.EXE command line to generate this.

For example:

tf.exe history /server:http://tfs:8080 "$/ProjectName/src" /version:D2010-09-12T11:30~D2010-09-29T11:30 /recursive /noprompt /brief

The /version: parameter is one of the keys here. This should be after the time of your first build and up to and including the time of the second build.

if you use /format:detailed, you'll get a listing of all files that changed in each of the changesets as well. This can be a lot of data. You'll probably want to redirect the output > output.txt if you do this.

UPDATE

As mentioned, you can, in fact, determine the changes between two labels. However, if these labels have moved, your results may be compromised.

tf.exe history /server:http://tfs:8080 "$/ProjectName/src" /version:LMain-CI_20100831.6~LMain-CI_20100927.1 /recursive /noprompt /brief

I would still recommend using the dates instead of the labels. I believe the results you receive from that approach probably more closely match your requirements.

UPDATE 2

I just noticed you're using TFS 2010. You will probably have to change the /server: parameter to point to the appropriate collection. Use TF.EXE history /? to get the list of parameters, but the change would be to use /collection:TeamProjectCollectionUrl




回答2:


tf history /server:"http://tfsserver:8080/tfs/DefaultCollection" "$/project root/Dir/SubDir" /recursive /noprompt /format:detailed /version:"L1.1.66.0~L1.1.67.0"

Notice L prefix in version option.



来源:https://stackoverflow.com/questions/3821734/show-all-changesets-between-two-labels

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