Welcome to MSDN Blogs Sign in | Join | Help

How to: Diff shelved files?

You can run:

tf diff /shelveset:shelvesetName;DOMAIN\ownerUserName

Please note that this will diff the shelved changes against the unmodified version, not necessarily the latest version, just like what the you get from clicking compare in the shelveset details dialog.

If you want to diff the shelved files programmatically against the latest version, you will need to write some code, please take a look at: http://blogs.msdn.com/mohamedg/archive/2009/03/08/how-to-diff-files-using-tfs-apis.aspx. If you are going to use the Difference class to launch a diff tool, you can use Difference.VisualDiffItems.

If you need to get the differences in a linked list of DiffSegments, you will need to unshelve the shelved file (fileA) and download the latest from server (fileB) to disk first, then diff them using the following call:

Difference.DiffFiles(fileA, FileType.Detect(fileA, null), fileB, FileType.Detect(fileB, null), new DiffOptions());
Published Saturday, April 18, 2009 3:34 AM by mohamedg
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# How to: Diff shelved files? | ASP NET Hosting

Saturday, April 18, 2009 3:52 AM by How to: Diff shelved files? | ASP NET Hosting

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker