tags:

views:

166

answers:

1

Anyone know if this (generating a unified diff) is possible and if so, how?

Thanks.

+3  A: 

It's tf diff /shelveset:<set> /format:unified. However, note that unlike most modern version-control systems, TFS can't actually work with patch files afaik. That is, you can't take the result of the diff and apply it to a set of files to get the resulting changes. (What most people do is zip up the files that changed and drop-and-replace that as a "patch". Ick.)

John Feminella
John, would you know how to output the results to a diff tool rather than to the command window? I accidentally found that doing /options:? would go to my default merge tool (TortoiseMerge.exe) in the absence of a /format:unified option, but I couldn't get it to go there with the unified option on.Also, I can only see my own shelvesets - would like to see all shelvesets for the team - is that possible, or do I have to run tf.exe from the server?
sydneyos
perfect - thanks. for others like myself who may not know, tf.exe is here (unless you installed somewhere else) - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE. Here's a reference: http://tutorial.visualstudioteamsystem.com/details.aspx?item=38.
sydneyos
I figured out how to get this to output to a .diff file. Type the command: "tf diff /format:unified [/shelveset:<set>] >filename.diff" Then, if you have anything installed (like TortoiseSVN) that will deal with the .diff format, just open it. et voila!
sydneyos
Sorry, I didn't see your earlier comments until just now. Piping to standard output is pretty much what I would have gone with too, so it sounds like you're all set!
John Feminella