Nick Craver
Nick Craver

Reputation: 630429

TFS - Get a changeset range

Every release I find it a good practice to go back and grab all the changeset notes to compare to the release notes to make sure we didn't miss anything. Since we have a blurb of all feature changes pretty well documented in the changeset notes, they're a valuable resource.

What I haven't found is a good way to extract these from TFS 2008. What I've tried:

What I'm after is pretty simple:

This within a certain range...whether it's restricted on dates or IDs, either's ok. If I could restrict it to within a certain branch in the project, that'd be a huge bonus.

What I'm doing now to get this data is opening up the TFS SQL Server directly and running this on the TfsVersionControl database:

SELECT    ChangeSetId, CreationDate, Comment
FROM      tbl_ChangeSet
WHERE     ChangeSetId > 6300

I tried but didn't find a good resource for this, it seems all the great TFS info that was on Vertigo's blogs has been lost as the links are now dead. Does anyone have a better/sane way of yanking out this info? The format isn't important, anything in a tabular/xml/whatever format that I can convert to be readable works.

Side note: We're upgrading to VS 2010 within a week or so of release...if the answer is VS2010/TFS2010 only that's even better since it's a long-term solution.

Upvotes: 5

Views: 4329

Answers (2)

Dharmesh Shah
Dharmesh Shah

Reputation: 71

There is this open source project at http://tfschangelog.codeplex.com that is designed to allow users to specify changeset range and generate release notes based on the chnageset comments and associated workitems for each changeset within the given range.

TFS ChangeLog extracts information in XML and then uses XSLT 2.0 to transform it to HTML. Users can define their own styles, filter, output method, etc. to generate useful release notes information. In fact it opens up possibility for developers and testers to provide meaningful contents for your release notes.

This tool comes in two different forms which includes Desktop version and a command line version. Due to support for command line interface, it becomes possible to schedule generating release notes from windows scheduler.

Upvotes: 0

Keith Hill
Keith Hill

Reputation: 201682

The Team Foundation Power Tools (October 2008) comes with a PowerShell snapin (32-bit only if you happen to be on Windows x64). Try this:

Add-PSSnapin Microsoft.TeamFoundation.PowerShell
Get-TfsItemHistory . -Recurse -Version C57460~58090 | 
    fl Comment,ChangesetId,CreationDate,Committer


Comment      : Added printf's in a couple of event callbacks
ChangesetId  : 58090
CreationDate : 2/25/2010 1:46:09 PM
Committer    : ACME\johndoe
...

This does preserver newlines in the comments. IF you are on x64 Windows make sure you run this from a 32-bit (x86) PowerShell prompt.

Upvotes: 9

Related Questions