Show all changesets between two labels

tfs

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 ?

Best Answer

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

Related Topic