试图在Mac上设置svn外部diff程序 [英] trying to setup svn external diff program on mac

查看:142
本文介绍了试图在Mac上设置svn外部diff程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试在Mac OSX Lion上为svn设置外部差异程序时遇到问题. 我同时安装了xxdiff和opendiff.

I'm having problems trying to setup an external diff program for svn on Mac OSX Lion. I have both xxdiff and opendiff installed.

我将这些行添加到〜/.subversion/config:

I add these lines to ~/.subversion/config:

diff-cmd = opendiff
diff3-cmd = opendiff

diff-cmd = /Applications/xxdiff.app/Contents/MacOS/xxdiff
diff3-cmd = /Applications/xxdiff.app/Contents/MacOS/xxdiff

但是当我调用svn时,出现此错误:

But when I invoke svn, I get this error:

svn: /Users/tre11/.subversion/config:49: Option expected

如何解决此问题?

推荐答案

除了GNU之外,没有很多diff实用程序,它们会使用svn给定的参数(bbdiff是少数几个) .您需要将调用包装在shell脚本中.在Subversion文档中 中进行了解释.

There aren't many diff utilities, aside from the GNU ones of course, that will take the parameters as given by svn (bbdiff is one of the few). You need to wrap the call in a shell script. It's explained in the subversion docs.

修改 根据您的评论,默认文本diff仍在运行,我认为您的.subversion/config文件中存在错误.这与您的错误消息是一致的.最可能的原因是diff-cmd行开头的空格.是的,Subversion的解析器在行首的空格处出现异常.我在diff-cmd行的开头放置了一个空格,并出现了相同的"Option Option Expected"错误.

Edit Based on your comment that the default text diff is still being run, I think there's an error in your .subversion/config file. That's consistent with your error message. The most likely cause is a space at the beginning of the diff-cmd line. Yes, subversion's parser freaks out at spaces at the beginning of the line. I put a space at the beginning of my diff-cmd line and got the same "Option expected" error.

这篇关于试图在Mac上设置svn外部diff程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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