如何让 Subversion 使用第三方 diff 工具?
我需要的不仅仅是默认的差异! 我最近购买了“Beyond Compare”,我想将它与 svn 集成,因此当我输入:
svn diff foo.c
时它就会启动我该如何操作?
I need more than the default diff! I have recently purchased "Beyond Compare" and I'd like to integrate it with svn, so its launched when I type:
svn diff foo.c
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
来自 Beyond Compare 论坛帖子:
:
/usr/bin/ bcompare_svn bcompare 的调用是显而易见的,但我必须添加“exit 0”,以便 svn 一次打开多个文件。
为了使 svn 调用我的脚本,我在 ~/.subversion/config 的 [helpers] 部分添加了以下行
From a Beyond Compare forum post:
/usr/bin/bcompare_svn:
The invocation of bcompare is obvious but I had to add "exit 0" so that svn would open more than one file at a time.
To make svn invoke my script, I added the following line in the [helpers] section in ~/.subversion/config
查看 svn --diff-cmd。
Look at svn --diff-cmd.
我想对安迪·莱斯特的回答添加评论,但我没有足够大的声誉。 不过,我想我可以回答这个问题。
无论如何...正如安迪已经指出的那样,运行“svn help diff”,但只是为了给你答案...
svn diff --diff-cmd; --extensions;
svn diff --diff-cmd /usr/bin/diff --extensions "-bca" <文件名>;
I'd like to add a comment to Andy Lester's answer but I don't have a big enough reputation. However, I can answer the question, I guess.
Anyways... as Andy already noted run "svn help diff" but to just give you the answer...
svn diff --diff-cmd <diff-cmd> --extensions <diff-cmd options>
svn diff --diff-cmd /usr/bin/diff --extensions "-bca" <filename(s)>
我最近将 Linux 上的 Subversion 说明添加到我们的 使用 Beyond Compare 与版本控制系统< /a> 网页。 按照上述链接中的步骤操作后,当您运行“svn diff”时,它应该会启动 Beyond Compare 3 for Linux。
I recently added instructions for Subversion on Linux to our Using Beyond Compare With Version Control Systems web page. Once you follow the steps at the above link it should launch Beyond Compare 3 for Linux when you run "svn diff".
在最新的 Subversion 中,脚本 /usr/bin/bcompare_svn 应该是这样的:
或者(未经测试的代码)
In latest Subversion, the script /usr/bin/bcompare_svn should be like this:
or (untested code)