Command-line access to VS 2012 merge tool

别来无恙 提交于 2019-12-03 03:39:52

The vsDiffMerge.exe tool appears to work for both diffing and three-way merging. I was successfully able to integrate the VS diff/merge tool with the Perforce client for merging and integrating.

The arguments to be provided to the tool (at least for Perforce) are:


Diff

vsDiffMerge.exe /t %1 %2

Where:

  • /t (open in a temporary tab, leave off to open in permanent tab)
  • %1 (First File)
  • %2 (Second File)

Merge:

vsDiffMerge.exe /m %1 %2 %b %r

Where:

  • /m (merge operation, leave off to do a diff)
  • %1 (Their/Source file)
  • %2 (Your/Target file)
  • %b (Base file)
  • %r (Result file)

Note: The "%" explanations came from Perfore documentation at: http://www.perforce.com/perforce/doc.current/manuals/p4v/Configuring_display_preferences.html#Diff

EDIT: Sorry everyone, I'm not sure how I mixed that one up. Mark Sowul is entirely correct by my testing today. I have fixed my answer. Also, apologies for not getting this corrected as soon as the first comment was posted. I just arrived back home from an overseas trip.

I found a solution for the error which occurs together with the merge option. I created the file which should be used for the merged file. See more details in my comment here: http://www.codeproject.com/Articles/649736/Solving-the-resx-Merge-Problem-in-TFS?msg=4745473#xx4745473xx

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