使用内置的Visual Studio差异工具查看P4VS的差异 [英] Using the Built in Visual Studio Diff Tool to View P4VS's Diffs
问题描述
Visual Studio有一个出色的内部差异工具: https://www.visualstudio.com/zh-CN/docs/tfvc/compare-files
Visual Studio has a fantastic internal diff tool: https://www.visualstudio.com/en-us/docs/tfvc/compare-files
我正在通过P4VS插件在Visual Studio中使用Perforce.右键单击文件选项卡时,该插件会添加"Diff"子菜单.但是默认情况下,任何差异操作都是由P4M执行的,而不是使用Visual Studio的内部差异工具:
I'm using Perforce in Visual Studio via the P4VS plugin. The plugin adds the "Diff" sub-menu when you right-click on a file's tab. But by default any diff operations are carried out by P4M, rather than using Visual Studio's internal diff tool:
值得称赞的是,P4VS确实允许选择其他差异应用程序.但是该规定是用于命令行操作的.我不知道如何使用Visual Studio差异工具的 current 实例.有办法吗?
To it's credit, P4VS does allow for the selection of a different diff app. But the provision is for a command line operation. I don't know how to make it use the current instance of Visual Studio's diff tool. Is there a way to do that?
推荐答案
您绝对可以使用Visual Studio的Diff工具!您只需要使用/diff
选项运行devenv: https://msdn .microsoft.com/en-us/library/jj874068.aspx
You can absolutely use Visual Studio's Diff tool! You just need to run devenv with the /diff
option: https://msdn.microsoft.com/en-us/library/jj874068.aspx
这样做将在当前的 Visual Studio实例中生成差异.
Doing so will spawn the diff in the current Visual Studio instance.
要在问题中指定的源代码控制">"Perforce-差异/合并"选项对话框的默认差异应用程序"部分中进行设置,
To set this up in the "Default diff application" section of the "Source Control" > "Perforce - Diff/Merge" options dialog that you specify in your question:
- 选择其他"
- 在位置"中,指定devenv.exe的路径(默认路径为:"C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ devenv.exe")
- 对于参数",请使用"/diff%1%2"
因此您的对话框将如下所示:
So your dialog will look something like this:
这篇关于使用内置的Visual Studio差异工具查看P4VS的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!