无法使用Meld进行SVN差异 [英] Unable to svn diff using meld

查看:422
本文介绍了无法使用Meld进行SVN差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Meld来查看版本之间的差异.我安装了meld,然后在项目目录中执行:

I want to use meld to view the difference between revisions. I installed meld and then executed in the project directory:

svn diff -r 2165:2182 --diff-cmd meld

但它会引发以下错误:

Index: app/models/college_friends_count.rb
===================================================================
svn: E200012: Process 'meld' failed (exitwhy 2)

有人可以告诉我这里出了什么问题吗?

Can anybody tell me what is going wrong here?

推荐答案

我相信E200012表示使用非零退出代码退出的基础进程(合并).许多差异工具会这样做以指示差异操作的结果(0 =无差异1 =差异等).

I believe E200012 means the underlying process (meld) exited with a non-zero exit code. Lots of diff tools do this to indicate the result of the diff operation (0 = no difference 1 = differences, etc).

尽管我的Meld版本似乎未使用非零退出代码,但我知道colordiff确实使用了它,这会在目录爬网"svn diff"期间停止SVN,就像上面的示例中那样.在没有任何更改要测试的文件上尝试一下.

Though my version of meld doesn't appear to use non-zero exit codes, I know colordiff does, which halts SVN during a directory-crawling "svn diff", like in your example above. Try it on a file that doesn't have any changes to test.

一个好的解决方法是制作自己的diff命令,假设您称其为meld_svn:

A good fix is to to make your own diff command, let's say you call it meld_svn:

#!/bin/bash
meld "$6" "$7" 
exit 0

所以我们正在做的是忽略Meld的退出代码,并使用我们自己的退出代码(这不会停止SVN).参数周围的引号表示其中包含空格的文件名不会破坏您的脚本.

So what we're doing is ignoring meld's exit codes, and exiting with our own (which won't stop SVN). The quotes around the arguments mean that filenames with spaces in them won't break your script.

使其可执行,然后编辑〜/.subversion/config并将diff-cmd设置为"meld_svn".这对colordiff非常有效,如果meld确实以非零的退出代码退出,则应该解决与meld有关的问题.

Make it executable, then edit your ~/.subversion/config and set the diff-cmd to "meld_svn". This works great for colordiff, should fix your problem with meld if meld's indeed exiting with non-zero exit codes.

我希望能帮上忙.

这篇关于无法使用Meld进行SVN差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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