Svn diff to output all lines from files

时间秒杀一切 提交于 2019-12-03 02:23:55

Perhaps the following is close to what you want:

First, create a diff script that will use the args received from svn appropriately:

#!/bin/sh
# file : /usr/local/bin/mydiff

# assumes less that 10,000 lines per file
/usr/bin/diff -U10000 $6 $7

And then diff with svn:

svn diff --diff-cmd /usr/local/bin/mydiff

If you want to more closely customize the diff output you need only modify your mydiff script.

Yes, you can use external diff to accomplish this. I usually do it by command like this:

svn diff --diff-cmd diff -x "-U30" 

Here, -U30 is unified context size. You should make it big enough to include all lines from file. For example, if your longest file has 1000 lines, you'd use -U1000.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!