如何在SVN中以Vimdiff样式查看SVN差异 [英] How to view svn diff in vimdiff style in svn

查看:60
本文介绍了如何在SVN中以Vimdiff样式查看SVN差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始在 Linux 上使用 Subversion. svn diff 提供了非常隐秘的视图-非常不友好.如何解释其输出?更重要的是,有没有一种方法可以查看vimdiff那种整齐的样式的差异,即两个文件都可以并排打开?

I am starting to use Subversion on Linux. svn diff gives a very cryptic view—very, very unfriendly to eyes. How do I interpret its output? And more importantly, is there a way to view the difference in vimdiff kind of neat style, where both files will open side by side?

推荐答案

在以下位置找到了它: http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/

Found it at: http://blog.tplus1.com/index.php/2007/08/29/how-to-use-vimdiff-as-the-subversion-diff-tool/

此博客文章直接从 diffwrap.sh

#!/bin/sh

# Configure your favorite diff program here.
DIFF="/usr/local/bin/vimdiff"

# Subversion provides the paths we need as the sixth and seventh 
# parameters.
LEFT=${6}
RIGHT=${7}

# Call the diff command (change the following line to make sense for
# your merge program).
$DIFF $LEFT $RIGHT

# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.

注意:这假设您的 vimdiff 位于/usr/local/bin 中,对我而言,在Fedora中,它位于<代码>/usr/bin.如果找不到,请运行:

Note: This assumes that your vimdiff is in /usr/local/bin, for me, in Fedora, it was in /usr/bin. If you can't find it run:

$ whereis vimdiff

然后输入〜/.subversion/config :

[helpers]
...
diff-cmd = /home/<username>/bin/diffwrap.sh

这篇关于如何在SVN中以Vimdiff样式查看SVN差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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