Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2010 TFS下的MS Office文件差异_Visual Studio 2010_Tfs_Ms Word_Ms Office - Fatal编程技术网

Visual studio 2010 TFS下的MS Office文件差异

Visual studio 2010 TFS下的MS Office文件差异,visual-studio-2010,tfs,ms-word,ms-office,Visual Studio 2010,Tfs,Ms Word,Ms Office,当您在Team Foundation Server源资源管理器中比较两个版本的MS Word doc/Excel图书时,其结果是乏味的“二进制文件差异”对话框。 但不一定要这样。相关应用程序(Word/Excel)具有出色的内置差异界面。当您使用启用版本控制的SharePoint文件库并与以前的版本进行比较时,您可以看到它。另外,当你做不同动作时,乌龟会把它带出来 问题-我可以在TFS中启用此功能吗?您可以根据文件类型(扩展名)配置比较(差异)和合并工具。这可通过工具>选项>源代码控制> Vis

当您在Team Foundation Server源资源管理器中比较两个版本的MS Word doc/Excel图书时,其结果是乏味的“二进制文件差异”对话框。

但不一定要这样。相关应用程序(Word/Excel)具有出色的内置差异界面。当您使用启用版本控制的SharePoint文件库并与以前的版本进行比较时,您可以看到它。另外,当你做不同动作时,乌龟会把它带出来


问题-我可以在TFS中启用此功能吗?

您可以根据文件类型(扩展名)配置比较(差异)和合并工具。这可通过<强>工具>选项>源代码控制> VisualStudio Team Foundation Server > >配置用户工具“按钮< /强>或通过命令行与<强>代码> TF差异/配置< /代码> <强>

为了设置比较工具,您需要指定扩展名(如果希望将其用于所有未另行指定的文件,请使用
*
)、正在设置的操作(比较或合并)、要调用的命令以及命令的参数。对于参数,可供使用的变量如下:

%1 = Original file (in diff, the pre-changes file, in merge, the "server" or "theirs" file, the file that is the base file after "their" changes were applied)
%2 = Modified file (in diff, the post-changes file, in merge the "yours" file - the base file with "your" changes applied)
%3 = Base file (in the 3-way merge operation, the file which both "theirs" and "yours" are derived from - the common ancestor.  This doesn't mean it's the version the changes were based from, since this may be a cherry-pick merge)
%4 = Merged file (The output file for the merge operation - the filename that the merge tool should write to)
%5 = Diff options (any additional command-line options you want to pass to your diff tool - this comes into play only when using "tf diff /options" from the command-line)
%6 = Original file label (The label for the %1 file)
%7 = Modified file label (The label for the %2 file)
%8 = Base file label (The label for the %3 file)
%9 = Merged file label (The label for the %4 file)
要使用TortoiseSVN(看起来它做了您想要的事情),您可以将该命令指定为
tortoisesremerge.exe

要进行比较,请指定参数:
/base:%1/mine:%2/basename:%6/minename:%7

对于合并,请指定参数:
/base:%3/我的:%2/他们的:%1/基本名称:%8/我的名称:%7/他们的名称:%6/合并的:%4/合并的名称:%9


可以找到关于各种合并工具(包括其他单词比较工具,如
DiffDoc.exe
)参数的此信息和其他信息。您还可以在上的另一个stackoverflow问题中找到用法。

您也可以在TFS中使用WinMerge+xdocdiff插件,应用以下两个步骤:

  • 将WinMerge与VS-TFS关联:

  • 在WinMerge中启用xdocdiff插件:


  • 这样,您还可以使用xdocdiff支持的所有文件类型。

    现在我认为最好的方法是使用MS Word compare,它比其他doc diff工具要好得多(MS Word本机支持比较,但合并除外)。
    通过使用()提供的powershell脚本,您可以触发MS word compare函数insde TFS compare。为了解决PS执行策略问题,您需要通过添加“-ExecutionPolicy Bypass”来更改diff-word.cmd中的内容。导入“diff-word.cmd”后对于.docx compare,它工作得非常好。

    我将的一个副本保存到一个目录中,用作命令,并为其提供了参数“%1%2”。非常好。只是扩展一下@DanielBallinger所说的,实际上有很多文件格式(Word、Excel、Powerpoint、exe/dll等)的脚本。只是试图找到@sclarke81提到的脚本-但是由于它们已经从code.google.com移走了-现在可以在