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

纵饮孤独 提交于 2019-11-30 12:48:32

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!

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!