让 svn 根据文件扩展名自动检测 diff-cmd 和 diff3-cmd
在 Git 中,可以在 .gitattributes
中指定这些并执行一些附加配置:
git config diff.difftool.command ...
git config merge.mergetool.driver ...
在 Mercurial 中,可以在 hgrc
文件中指定模式 ([diff-patterns]< /code> 和
[merge-patterns]
部分)。
如何在 Subversion 中实现这一点?
In Git one can specify these in .gitattributes
and perform some additional configuration:
git config diff.difftool.command ...
git config merge.mergetool.driver ...
In Mercurial it is possible to specify patterns in hgrc
file ([diff-patterns]
and [merge-patterns]
sections).
How to achieve this in Subversion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Subversion 红皮书 (通常是所有知识的来源)这里不太具体。它指出可以选择配置
diff-cmd
和diff3-cmd
,并且可以向呼叫添加扩展。然而,它指出以下内容:
它没有说明如何影响该决定:-(
如果您使用 TortoiseSVN 工具,则包含配置选项来指定所考虑文件的每个 mime 类型所使用的 diff 工具。该配置的路径是:
TortoiseSVN > 设置 > 差异查看器 > 高级...
我个人认为您应该使用包装器。无论如何 diff-tool ,并根据 mime 类型决定使用哪种工具和哪种特定配置。
The red-book for Subversion (normally the source of all knowledge) is not too specific here. It names that there is the option to configure
diff-cmd
anddiff3-cmd
and that it is possible to add extensions to the call.However, it states the following:
It does not say how to influence that decision :-(
If you are using the tool TortoiseSVN, there are configuration options included to specify the used diff tool per mime-type of the file under consideration. The path to that configuration is:
TortoiseSVN > Settings > External Programs > Diff Viewer > Advanced...
. Perhaps that is an option for you.My personal opinion here is that the subversion team thinks that you should use a wrapper as diff-tool anyway, and to do there the decision what tool to use with which specific configuration based on the mime-type.