Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a 'Get Latest Version' preview in TFS? (Like VSS 'Get' command)

My question relates to Team Foundation Server (TFS) and specifically, is there any way to know which files have changed on the server before doing a 'Get Latest Version (Recursive)?

In Visual Source Safe (VSS), you could do a 'Get' (I think) which showed you all the files which were being considered for the update and which files we're changed on the server (an consequently would be updated during the get). This functionality seems to be completely missing!

Also, when I do a 'Get Latest Version' in TFS, there doesn't seem to be any notification that any things occurred, other than the blur of a progress bar momentarily. I would have expected a notification at the end that there were no updates to be made, or n files were updated. Instead I have to hunt in the TFS output in Visual Studio to see what happened. Is this right?

Thanks a lot in advance!

Andy.

like image 579
Andy Avatar asked Jan 11 '11 11:01

Andy


2 Answers

Thanks to this question/answer, I have happily been using tf get /recursive /preview for about a year now.

But it turns out that there is something like this integrated into Visual Studio, at least 2010 and later.

Go to:

  • View menu, Other Windows, Source Control Explorer
  • navigate to the path you're interested in, right-click, and pick "Compare"
  • set "Target Path" to the equivalent local path
  • you might want to un-check "Show items that exist only in target path"
  • OK

You get a nice view of the potential changes previewed, and you right-click on individual files and do a Compare to see exactly what you're going to get.

I'm so glad a colleague showed me this today!

like image 50
Jeff Roe Avatar answered Sep 30 '22 18:09

Jeff Roe


There's not one built in to Visual Studio, but there is the /preview option on the TFS command line. There's more information on all the command line options on the MSDN page for the Get Command

The TFS command you need is:

get "[path]" /recursive /preview /login:[user],[password]

Set this up on an External Tool in Visual Studio.

Title: "Get Latest Preview"  
Command: c:\program files\microsoft visual studio 10.0\Common7\IDE\TF.exe
Arguments: [See above]
Initial Directory: ""

Make sure that "Use Output window" is enabled and "Prompt for arguments" isn't.

like image 43
ChrisF Avatar answered Sep 30 '22 19:09

ChrisF