From 5a128469347a9383476fc2bb9263b3f71332e31d Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 23 Jul 2013 10:13:21 +0100 Subject: Also fixup the branch names in the revision map SQL. --- scripts/mageia-reset-and-import.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh index 4cd9e53..5351ae1 100755 --- a/scripts/mageia-reset-and-import.sh +++ b/scripts/mageia-reset-and-import.sh @@ -418,7 +418,7 @@ for branch in $branches; do git branch -m $branch distro/mdv$branch elif (echo $branch | grep -qE '^mes[0-9].*$'); then git branch -m $branch distro/$branch - elif [ $branch != "master" ]; then + elif [ "$branch" != "master" ]; then git branch -m $branch topic/$branch fi done @@ -455,7 +455,19 @@ parsesvnrevmap() if [ -n "${tagmap[$sha1]}" ]; then echo "INSERT INTO refs VALUES('$2', '$SOFTWARE', $rev, '', '${tagmap[$sha1]}');" else - echo "INSERT INTO refs VALUES('$2', '$SOFTWARE', $rev, '$sha1', '$3');" + branch=$3 + if [ -n "$branch" ]; then + if (echo $branch | grep -qE '^[0-3]$'); then + branch=distro/mga$branch + elif (echo $branch | grep -qE '^20[0-9\.]+$'); then + branch=distro/mdv$branch + elif (echo $branch | grep -qE '^mes[0-9].*$'); then + branch=distro/$branch + elif [ "$branch" != "master" ]; then + branch=topic/$branch + fi + fi + echo "INSERT INTO refs VALUES('$2', '$SOFTWARE', $rev, '$sha1', '$branch');" fi # Exit if we've reached our reset sha1 as any future revisions are not used -- cgit v1.2.1