简体   繁体   English

TFS中是否有“获取最新版本”预览? (就像VSS的“获取”命令一样)

[英]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)? 我的问题与Team Foundation Server(TFS)有关,具体地说,在执行“获取最新版本(递归)”之前,是否有任何方法可以知道服务器上哪些文件已更改?

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). 在Visual Source Safe(VSS)中,您可以执行“获取”(我认为),它会向您显示正在考虑进行更新的所有文件以及我们在服务器上更改了哪些文件(因此将在更新过程中进行更新)。得到)。 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. 另外,当我在TFS中执行“获取最新版本”时,似乎没有任何通知发生任何事情,除了进度条的模糊。 I would have expected a notification at the end that there were no updates to be made, or n files were updated. 我本来希望在最后收到通知,说没有要进行的更新,或者更新了n个文件。 Instead I have to hunt in the TFS output in Visual Studio to see what happened. 相反,我必须在Visual Studio中搜寻TFS输出,以了解发生了什么。 Is this right? 这是正确的吗?

Thanks a lot in advance! 在此先多谢!

Andy. 安迪

Thanks to this question/answer, I have happily been using tf get /recursive /preview for about a year now. 多亏了这个问题/答案,我很高兴已经使用tf get /recursive /preview大约一年了。

But it turns out that there is something like this integrated into Visual Studio , at least 2010 and later. 但事实证明, 这样的集成到Visual Studio,至少在2010年以后。

Go to: 去:

  • View menu, Other Windows, Source Control Explorer 查看菜单,其他Windows,源代码管理资源管理器
  • 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. Visual Studio中没有内置的一个,但是TFS命令行上有/preview选项。 There's more information on all the command line options on the MSDN page for the Get Command 有关“获取命令”MSDN页面上的所有命令行选项的更多信息,

The TFS command you need is: 您需要的TFS命令是:

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

Set this up on an External Tool in Visual Studio. 在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. 确保已启用“使用输出窗口”,而未启用“提示输入参数”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM