views:

346

answers:

4

Hello,

Having run a compare between a main branch folder and a given changeset in Source Control (Visual Studio TFS), and finding a number of differences, I would like to export the results to a spreadsheet so that it can be passed around and notes made etc...

Is there any way that I can export this list results from the Folder Difference screen?

Cheers

Nige

A: 

Not directly afaik, your best bet is to create a new workspace, check out the specific changeset, and use Beyond Compare / GNU diff -urw | grep "^diff" / et al. to get the list out.

Paul Betts
This is 100X slower, unfortunately. Not only do you have to download files over the wire, but the comparisons have to be byte-for-byte rather than using the hash values already stored on the server.
Richard Berg
Ah, I interpreted the question as that he wants the actual *code differences* between the two branches, not just the filenames.
Paul Betts
+4  A: 

A good solution is to copy and paste into Excel.

Start at the top, select all the items Ctrl+C and then Ctrl+V into Excel.

Joe
Joe - you win my personal award for best answer by someone with a reputation of 1. I never knew you could copy/paste results from Folder Diff in VS 2008 - but it works! Good one.
Martin Woodward
+1 Wow, this is news to me as well. (Consider that for over a year, my office was next door to the guy who wrote Folder Diff!)
Richard Berg
+1  A: 

Not to take anything away from Joe's super cool answer, but I should point out this is also possible from the command line.

C:\Temp>tf folderdiff /?
TF - Team Foundation Version Control Tool
Copyright (c) Microsoft Corporation.  All rights reserved.

Displays a visual representation of the differences between files in two server
folders, in a server folder and a local folder, or in two local folders.

tf folderdiff [sourcePath] targetPath [/recursive] [/noprompt]
              [/server:serverName:port] [/filter:filter]
              [/filterLocalPathsOnly]
              [/view:same,different,sourceOnly,targetOnly]

Pass /noprompt (aka /i) to print a textual display to the console or redirect it to a file. E.g.:

tf folderdiff . /r /i > diffs.txt
Richard Berg
This method has the added bennie that it can be done as part of a job stream and the results processed by other tools for distribution etc.
DaveE
A: 

I think it is a failing in TFS that it does not let you 'get' just the differences. As it can be used for items not created using VS, it is helpful ot be able to just get differences when building patches etc. Most other tools provide this function.

Lynd