summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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