Code: Select all
#!/bin/bash
# Create patch-files for each svn revision between two given revision numbers
# Author: Michael Zeilfelder
# License: Don't care - use as you want.
if [ ! $1 ] || [ ! $2 ]|| [ ! $3 ]; then
echo Create patch-files for each svn revision between two given revision numbers:
echo $0 r1:r2 target
echo Where r1 and r2 are svn revisions, r2 > r1 and target is the basename of the patchfiles
exit
fi
t=`expr $2 - 1`
for i in $(eval echo {$1..$t})
do
# create a patch file for a single version using the diff from the system
k=`expr $i + 1`
name="$k""$3"
svn diff --diff-cmd /usr/bin/diff -r"$i":"$k" > "$name"
# delete empty diff files
if [ ! -s $name ] ; then
rm $name
fi
done
edit: Just learned that in svn 1.7 the same can be done with: svn log --diff
Oh well, thanks to using Debian stable I don't have newest svn, so my work wasn't a copmlete waste ;-)