From 63523fcc433c0c38bd0ca5787c1ac0b9cf8cd5b6 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Fri, 14 Jun 2013 12:32:26 +0100 Subject: Include the contents of any CLEANUP_PROGRESS.txt file in the synthesised commit message. --- scripts/mageia-reset-and-import.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh index 664dc12..2c0dc80 100755 --- a/scripts/mageia-reset-and-import.sh +++ b/scripts/mageia-reset-and-import.sh @@ -255,12 +255,25 @@ EOF svn log -r 1:$revision $NEWSVNURL/$SOFTWARE/trunk >>$COMMITTXT squashedrevs=$(svn log -r 1:$revision $NEWSVNURL/$SOFTWARE/trunk | grep -E "^r[0-9]+ \| " | cut -d' ' -f1 | xargs | sed 's/r//g') +rev=0 if [ -n "$morerevisions" ]; then for rev in $morerevisions; do svn log -r $rev $NEWSVNURL/$SOFTWARE | tail -n +2 >>$COMMITTXT done fi +# Import any documentation from the CLEANUP_PROGRESS.txt file +[ "$rev" = "0" ] && rev=$revision +CLEANUP_PROGRESS=$(mktemp /tmp/cleanupprogress.XXXXXX) +svn cat $NEWSVNURL/$SOFTWARE/CLEANUP_PROGRESS.txt@$rev 2>/dev/null >$CLEANUP_PROGRESS +if [ -s $CLEANUP_PROGRESS ]; then + echo >>$COMMITTXT + echo "In addition to the above commits, the following cleaning work has been recorded:" >>$COMMITTXT + echo >>$COMMITTXT + cat $CLEANUP_PROGRESS >>$COMMITTXT +fi +rm -f $CLEANUP_PROGRESS + COMMITDATE=$(svn log -r $revision $NEWSVNURL/$SOFTWARE | head -n2 | tail -n1 | cut -d'|' -f3 | cut -d'(' -f1 | trim) env GIT_COMMITTER_NAME="Mageia SVN-Git Migration" \ GIT_COMMITTER_EMAIL="svn-git-migration@mageia.org" \ -- cgit v1.2.1