summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-07-23 10:13:21 +0100
committerColin Guthrie <colin@mageia.org>2013-07-23 10:13:21 +0100
commit5a128469347a9383476fc2bb9263b3f71332e31d (patch)
treecf4283f51cd63bb2b8f38f88e47b871f23e955d0
parentbb65e4fb63653178b9d4645d06f5d0289e38225b (diff)
downloadsvn-git-migration-5a128469347a9383476fc2bb9263b3f71332e31d.tar
svn-git-migration-5a128469347a9383476fc2bb9263b3f71332e31d.tar.gz
svn-git-migration-5a128469347a9383476fc2bb9263b3f71332e31d.tar.bz2
svn-git-migration-5a128469347a9383476fc2bb9263b3f71332e31d.tar.xz
svn-git-migration-5a128469347a9383476fc2bb9263b3f71332e31d.zip
Also fixup the branch names in the revision map SQL.
-rwxr-xr-xscripts/mageia-reset-and-import.sh16
1 files 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