如何在 SourceTree for Mercurial 中使用 Visual Studio (vsdiffmerge) 作为外部差异工具?
How to use Visual Studio (vsdiffmerge) as external diff tool in SourceTree for Mercurial?
我使用 Mercurial 作为我的源代码控制,并使用 SourceTree 来管理它。我想使用 Visual Studio 的内置差异和合并工具 (vsdiffmerge) 来比较文件,但这不起作用。
我目前使用的是:
差异命令:
\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"
不同参数:
\"$LOCAL\" \"$REMOTE\" //t
合并命令:
\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"
合并参数:
\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m
Visual Studio diff 工具没有启动。你能看看吗?
更新:-
We should use like below:-
Diff Command:
full path of vsDiffMerge.exe
For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder. Visual Studio 2017 has it slightly more hidden. Look under Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer.
Diff Argument: "$LOCAL" "$REMOTE" "Source" "Target" //t
Merge Argument: $LOCAL" "$REMOTE" "$BASE" "$MERGED" //m
按照此 SO 获取更多指导
What are the command line arguments for TFS default merge tool for VS 2012?
还有这些指针
http://roadtoalm.com/2013/10/22/use-visual-studio-as-your-diff-and-merging-tool-for-local-files/
事实是,我也尝试设置它,但运气不佳。我碰巧使用Beyond Compare。如果你想让它工作,至少要保持在 SourceTree 在外部差异选项下拉列表中提供的选择范围内。没有充分的理由使用他们不支持的任何其他东西。
- 你在命令和参数中有很多无用的(至少)黑斜杠
- 阅读第 Setting Up DiffMerge 页,第二章并修正自己的错误
使用 Visual Studio 2015 Update 1 和 SourceTree 1.7.0.32509 这只是设置,对我有用:
C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsDiffMerge.exe
$REMOTE $LOCAL $BASE $MERGED //m
对于 Visual Studio 2015
Put this line in the Diff Command box:
C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsDiffMerge.exe
And this one in the Arguments box:
$REMOTE $LOCAL $BASE $MERGED //m
对于 Visual Studio 2019 企业 vsDiffMerge.exe
位置是:
C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
这是 VS 2019 差异和合并的完整答案,适用于 Git 和 Mercurial。
差异:
Diff Command: C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
Arguments: $LOCAL $REMOTE //t
合并:
Merge Command: C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
Arguments: $REMOTE $LOCAL $BASE $MERGED //m
如果您有 Enterprise VS 版本,请将路径更改为:C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
我使用 Mercurial 作为我的源代码控制,并使用 SourceTree 来管理它。我想使用 Visual Studio 的内置差异和合并工具 (vsdiffmerge) 来比较文件,但这不起作用。
我目前使用的是:
差异命令:
\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"
不同参数:
\"$LOCAL\" \"$REMOTE\" //t
合并命令:
\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"
合并参数:
\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m
Visual Studio diff 工具没有启动。你能看看吗?
更新:-
We should use like below:-
Diff Command:
full path of vsDiffMerge.exe
For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder. Visual Studio 2017 has it slightly more hidden. Look under Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer.
Diff Argument: "$LOCAL" "$REMOTE" "Source" "Target" //t
Merge Argument: $LOCAL" "$REMOTE" "$BASE" "$MERGED" //m
按照此 SO 获取更多指导 What are the command line arguments for TFS default merge tool for VS 2012?
还有这些指针 http://roadtoalm.com/2013/10/22/use-visual-studio-as-your-diff-and-merging-tool-for-local-files/
事实是,我也尝试设置它,但运气不佳。我碰巧使用Beyond Compare。如果你想让它工作,至少要保持在 SourceTree 在外部差异选项下拉列表中提供的选择范围内。没有充分的理由使用他们不支持的任何其他东西。
- 你在命令和参数中有很多无用的(至少)黑斜杠
- 阅读第 Setting Up DiffMerge 页,第二章并修正自己的错误
使用 Visual Studio 2015 Update 1 和 SourceTree 1.7.0.32509 这只是设置,对我有用:
C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsDiffMerge.exe
$REMOTE $LOCAL $BASE $MERGED //m
对于 Visual Studio 2015
Put this line in the Diff Command box:
C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsDiffMerge.exe
And this one in the Arguments box:
$REMOTE $LOCAL $BASE $MERGED //m
对于 Visual Studio 2019 企业 vsDiffMerge.exe
位置是:
C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
这是 VS 2019 差异和合并的完整答案,适用于 Git 和 Mercurial。
差异:
Diff Command:
C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
Arguments:
$LOCAL $REMOTE //t
合并:
Merge Command:
C:\Program Files (x86)\Microsoft Visual Studio19\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
Arguments:
$REMOTE $LOCAL $BASE $MERGED //m
如果您有 Enterprise VS 版本,请将路径更改为:C:\Program Files (x86)\Microsoft Visual Studio19\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe