如何制作 TortoiseSVN diff .dot 和 .dotx Word 模板文件 [英] How to make TortoiseSVN diff .dot and .dotx Word template files

查看:33
本文介绍了如何制作 TortoiseSVN diff .dot 和 .dotx Word 模板文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TortoiseSVN 具有惊人的差异 Microsoft Word 文档修订的能力,这显然是通过 C:\Program Files\TortoiseSVN\Diff-Scripts 中的脚本实现的,该脚本调用 MS Word 进行差异(而不是使用 TortoiseMerge 将它们作为文本文件进行区分,这当然不适用于 Word 文件).MS Word 本身能够区分 .dot 或 .dotx 文件的两个版本,使用相同的用户界面点击"作为区分 .doc 或 .docx 文件的两个版本,因此看起来 TortoiseSVN 脚本的 .doc 和 .docx 文件 (diff-doc.js) 也适用于 .dot 和 .dotx 文件.

TortoiseSVN has the amazing ability to diff Microsoft Word document revisions, made possible apparently by a script in C:\Program Files\TortoiseSVN\Diff-Scripts which calls out to MS Word to do the diff (instead of using TortoiseMerge to diff them as text files, which of course wouldn't work for Word files). MS Word itself is able to diff two versions of .dot or .dotx files, using the same user interface "clicks" as diffing two versions of .doc or .docx files, so it would seem that the TortoiseSVN script for .doc and .docx files (diff-doc.js) should also work for .dot and .dotx files.

为了让 TortoiseSVN 能够区分 .dot 和 .dotx 文件,我从这里编辑了 diff-doc.js 的第一行...

In attempting to enable TortoiseSVN to diff .dot and .dotx files, I edited the first line of diff-doc.js from this...

// extensions: doc;docx;docm

...至此:

// extensions: doc;docx;docm;dot;dotx

然后我尝试使用 TortoiseSVN 将 .dot 文件与其以前的版本进行比较,它的行为与以前相同(TortoiseMerge 抱怨它不是有效的文本文件).考虑到 TortoiseSVN 只在启动时检查脚本文件中的 extensions 注释,我重新启动,仍然是相同的行为.

And then I tried using TortoiseSVN to diff a .dot file with its previous version, and it behaved the same as before (TortoiseMerge complained that it wasn't a valid text file). Thinking perhaps TortoiseSVN only checks the extensions comments in the script files once on startup, I rebooted, and still the same behavior.

我是否缺少使 TortoiseSVN diff .dot & 所需的东西?.dotx 文件?(顺便说一句,我知道 .dot 扩展名被其他程序用于与 MS Word 无关的事情,我知道这会使带有 .dot 扩展名的文件与其真实文件格式不明确.)

Am I missing something necessary to make TortoiseSVN diff .dot & .dotx files? (BTW, I am aware that the .dot extension is used by other programs for things unrelated to MS Word, and I am aware that this makes files with .dot extensions ambiguous with regard to their true file format.)

推荐答案

您可以使用相同的脚本,只需告诉 Tortoise 如何处理您的 .dot/.dotx 文件扩展名:

You can use the same script, just tell Tortoise how to handle your .dot / .dotx file extension:

Right Click -> Tortoise SVN -> Settings -> Diff viewer -> Advanced...

您将看到当前扩展的列表.选择.docx,点击编辑并复制外部程序"的值到剪贴板.关闭它并单击添加...,插入 .dot 作为扩展名,将值从剪贴板粘贴到 外部程序" 字段.

You will see a list of current extensions. Select .docx, click edit and copy to clipboard the value of "External program". Close it and click Add..., insert .dot as extension, paste value from clipboard to "External program" field.

仅此而已.

这篇关于如何制作 TortoiseSVN diff .dot 和 .dotx Word 模板文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆