Created
February 1, 2015 08:17
-
-
Save rochefort/3638cf1b3048c641f557 to your computer and use it in GitHub Desktop.
svn diff wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sdr { | |
local rev; | |
local file; | |
if [ $# = 1 ]; then | |
if expr "$1" : '[0-9]*' > /dev/null ; then | |
rev=$1; | |
file=''; | |
else | |
file=$1 | |
rev=$(svn ls -v $file | awk '{print $1}') | |
fi | |
else | |
rev=$1 | |
file=$2 | |
fi | |
local bef_rev=$(expr $rev - 1) | |
svn diff -x -b -r $bef_rev:$rev $file | less -r | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment