#!/bin/sh # Collects the SVN logs for all changes between two releases of a SVN module # SVNURL must be set if test $# -ne 4; then echo "Usage: $0 " echo "where src is the relative repository path to the sources," echo "and tag_version and tag_last_version are the tag names in tags/." echo echo "Example: $0 kdepim branches/kdepim/proko2/kdepim kdepim/proko2_0_3 kdepim/proko2_0_4" exit 1 fi test -n "$SVNURL" || { echo "Please set SVNURL first"; exit 1; } # Abort at first error set -e APP=$1 SRCREP="$SVNURL/$2" LASTVER=$3 VER=$4 TAGSREP="$SVNURL/tags" changelog=$APP.changelog # Grep the version number of the move rev=`svn info $TAGSREP/$VER/ | grep "Last Changed Rev" | sed s/Last\ Changed\ Rev:\ //g` # Grep the log for the copyfrom revision (which is the real revision that this is taged from) tag=`svn log -r $rev $TAGSREP/$VER -v --xml | grep copyfrom-rev | sed s/.*copyfrom-rev=\"//g | sed s/\"//g | head -n 1` rev=`svn info $TAGSREP/$LASTVER/ | grep "Last Changed Rev" | sed s/Last\ Changed\ Rev:\ //g` lasttag=`svn log -r $rev $TAGSREP/$LASTVER -v --xml | grep copyfrom-rev | sed s/.*copyfrom-rev=\"//g | sed s/\"//g | head -n 1` cat > changelog.xslt < * EOF # Get the log between the two versions # We do it for each subdirectory, to separate the logs a bit. cp -f /dev/null $changelog for subdir in `svn ls $SRCREP`; do subdir=`echo $subdir | sed -e 's,/$,,'` svn log -r $tag:$lasttag $SRCREP/$subdir --xml > xml xsltproc -o xmlout changelog.xslt xml if test -s xmlout; then echo $subdir >> $changelog echo '------' >> $changelog cat xmlout >> $changelog echo >> $changelog fi rm -f xml xmlout done rm -f changelog.xslt echo "Changelog written to $changelog"