How to make TortoiseSVN diff .dot and .dotx Word template files

匿名 (未验证) 提交于 2019-12-03 08:54:24

问题:

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.

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 

...to this:

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

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.

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.)

回答1:

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... 

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.

That is all.



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