1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/bash
#echo $*;
#echo $#;
# this is where the head from svn will be
# checked out so that it can be diffed with
# what you got
tempDIR=$HOME/tmp/svn-HEAD
# total number of arguments to this script
i=$#;
#echo "lastargs = ${!i}"
# the filename you are diffing
# i get this from the last argurment of what
# diff command as given by svn
filename=${!i};
#echo "filename=$filename"
# i get the URL of this file from svn
url=`svn info $filename | grep URL | awk '{print $2}'`
#echo "url=$url"
# checkout the file into a temp dir
svn cat $url > $tempDIR/$filename
# and then do the diff!
xxdiff $tempDIR/$filename $filename &
|