I ended up sorting this myself. If anyone else has the same problem, I found that it was possible to get a list of all tags using
svn ls <repo URL including tags location>
and then get the versions in those tags using
svn info ...
And AWK the SVN INFO output using the following. Note I had to decrement the version number by 1 to get the actual version I was interested in. I think this is because during the import SVN copies the approriate version to the tag folder after creating the version and this is considered a version.
BEGIN { RS="";
FS = "\n"; }
/^Path:/ { n1 = split($1,path,":");
n3 = split($6,nodeKind, ":");
n2 = split($9,lastRev,":");
theRev = lastRev[2] -1;
printf("%8s %10s, %-75s\n", theRev, nodeKind[2], path[2]); }
WRKEYFILE and PTKEYFILE are just .csv lookup files to match against with a format of
PT_TICKET,PKEY,Issue Title
Then I wrote a script as follows ...
REPO=svn://vuwunicocsagfg1/Banner/tags
REPOPATH=/var/subversion/Banner
WRKEYFILE=workReq_pKey.unix
PTKEYFILE=ptTicket_pKey.unix
# working variables
TEMPFILE=$$.tmp
TAGLIST=$$.tags
REVISIONS=$$.revisions
SVNINFO=$$.info
SVNLOOK=/usr/bin/svnlook
# look up details in Subversion
svn info -R $REPO | awk -f new_svn_report.awk > $SVNINFO
svn ls $REPO > $TAGLIST
cat $TAGLIST | awk '{ print $1}' | while read LINE
do
JIRAISSUE=""
WRNUM=""
PTNUM=""
UWRNUM=""
UPTNUM=""
# Find Work Request or Perfect Tracker number
WRNUM=$(echo "$LINE" | sed -n -e "s:.*\([wW][rR][0-9# -][0-9]\+\).*:\1:p")
PTNUM=$(echo "$LINE" | sed -n -e "s:.*\([pP][tT][0-9# -][0-9]\+\).*:\1:p")
# upper case the strings found and remove unwanted chars
UWRNUM=`echo $WRNUM| tr 'a-z' 'A-Z' | tr --delete '# -'`
UPTNUM=`echo $PTNUM| tr 'a-z' 'A-Z' | tr --delete '# -'`
# Debug
# echo "=============================="
# echo "Line is: $LINE, WRNUM is: $WRNUM, PTNUM is: $PTNUM"
if [[ -n "$UWRNUM" ]]
then
# Find the JIRA issue number
awk -F',' '/'"$UWRNUM"'/ {print $2}' $WRKEYFILE | awk '{if (NR==1) {print $0}}' > $TEMPFILE
JIRAISSUE=`cat $TEMPFILE`
awk -F',' '/'"$UWRNUM"'/ {print $2,"; " $3}' $WRKEYFILE | tr '"' '_' | awk '{if (NR==1) {print $0}}' > $TEMPFILE
NEWLOG=`cat $TEMPFILE`
# all revisions in this Tag which are not directories
grep $UWRNUM $SVNINFO | grep -v "directory" > $REVISIONS
fi
if [[ -n "$UPTNUM" ]]
then
# Find the JIRA issue number
awk -F',' '/'"$UPTNUM"'/ {print $2}' $PTKEYFILE | awk '{if (NR==1) {print $0}}' > $TEMPFILE
JIRAISSUE=`cat $TEMPFILE`
awk -F',' '/'"$UPTNUM"'/ {print $2,"; " $3}' $PTKEYFILE | tr '"' '_' | awk '{if (NR==1) {print $0}}' > $TEMPFILE
NEWLOG=`cat $TEMPFILE`
# all revisions in this Tag which are not directories
grep $UPTNUM $SVNINFO | grep -v "directory" > $REVISIONS
fi
if [[ -n "$JIRAISSUE" ]]
then
cat $REVISIONS | awk '{ print $1}' | while read REVLINE
do
$SVNLOOK log -r "$REVLINE" "$REPOPATH" | tr '"' '_' > $TEMPFILE
OLDLOG=`cat $TEMPFILE `
if `echo $OLDLOG | grep "$JIRAISSUE" 1>/dev/null 2>&1`
then
LOGMSG=$OLDLOG
else
LOGMSG="$OLDLOG $NEWLOG"
fi
# Debug
# echo "Jira issue is: $JIRAISSUE"
# echo "update the log message for Revision $REVLINE"
# echo "New log message is: $LOGMSG"
# echo "***********************************"
echo "svn propset --revprop -r "$REVLINE" svn:log \""$LOGMSG"\" $REPO"
svn propset --revprop -r "$REVLINE" svn:log \""$LOGMSG"\" $REPO
echo ""
done
fi
done