2

Is there an automated way to create a change log using TFS 2010 and the version history of the files? I'd like to pull in all the comments that were entered for each changeset either between a label (or a specific date) and the current version, or between two labels (or two specific dates).

BlackICE
  • 8,816
  • 3
  • 53
  • 91

4 Answers4

4

Try using http://tfschangelog.codeplex.com. this tool allows users to generate release notes against given set of changeset range. It extracts information in XML format for all the changesets within a given range along with associated work items. It then uses XSLT 2.0 to translate output from XML into HTML. This way, users can use apply their own logic for filtering, styling, reporting format, etc.

Hope this is useful.

rhughes
  • 9,257
  • 11
  • 59
  • 87
  • Hi Dharmesh. I've installed the tool. It doesn't work for me - GUI version shows just ROOTPLACEHOLDER word and nothing else after selecting TFS collection and TFS project. CLI version requires --TFSChangeLogConfig, while I don't see any TFSChangeLogConfig.xsd or TFSChangeLogConfig.xml installed. – Ivan Sep 10 '13 at 10:47
2

Are you asking

  1. Is there a tool already that does all of this for me? OR
  2. Can I automate this process?

If #1, my answer is "I don't know, but I would check CodePlex and the Microsoft TFS downloads on MSDN" for this type of tool.

If #2, there are web services you can use to query TFS. They don't have the "give me all changes between X and Y date or A and B release", but you can get information on changesets, work items, etc. As you would be creating a document, good check in note discipline is mandatory to get a coherent document, unless you just want to know what was actually changed in code, which I think is overkill.

Are the APIs mature enough to easily automate to create version 1.x changes are type of documents? My answer is no, but your mileage may vary.

Gregory A Beamer
  • 16,870
  • 3
  • 25
  • 32
1

The tf.exe command line tool with give you the history or more or more items between two points in the history where those points can be specified by date, label or changeset number.

Eg.

tf history /version:C5~C8 MyClass.cs

See the help on MSDN: http://msdn.microsoft.com/en-us/library/yxtbh4yh.aspx

Richard
  • 106,783
  • 21
  • 203
  • 265
  • This is ok, but I'd really like something that outputs text, not open the GUI for me. – BlackICE Jun 02 '11 at 15:38
  • @David: 1. It is a command line and outputs to standard output. 2. Work Item association you would need to take the chanset set numbers from the history output and pass that into the `tf changeset` command. Then parse the output. – Richard Jun 02 '11 at 16:51
  • @David: I would also consider using the TFS PowerToy's PowerShell cmdlets (you need to do a custom install). These return objects: `Get-TfsItemHistory myfile.cs -version 'LfirstLabel~LsecondLabel' | %{(Get-TfsChangeset $_.ChangesetId).WorkItems}` – Richard Jun 02 '11 at 16:57
  • are you using tf.exe for 2010? any time I do tf history it opens a GUI window. I'm looking at the API now to see what I can do with that. – BlackICE Jun 02 '11 at 19:55
  • @David: Yes. And it worked the same when I was using TFS 2005 and 2008. – Richard Jun 02 '11 at 22:07
  • hmm, perhaps it is because I am trying to use on a project directory and not a single file. – BlackICE Jun 03 '11 at 13:02
  • @David: My error, I'm too used to the PSH cmdlets. Try `tf hist file /noprompt'. – Richard Jun 03 '11 at 13:16
0

Here is a simple CLI app that does just the job. It returns a changelog as text.

https://github.com/sandrock/tfchangelog

According to the sources, it enumerates changesets and outputs the comments in the terminal.

SandRock
  • 5,276
  • 3
  • 30
  • 49