summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-08-20 10:43:10 +0100
committerColin Guthrie <colin@mageia.org>2013-08-20 10:43:10 +0100
commitdb565f2335c2d8b2791215579dc616bc771acc49 (patch)
tree52a40157cacbe69ffc42e8d9a94fb27ffcb5fa9c
parent84d9d98c611932b085de07c87a6968430908b912 (diff)
downloadsvn-git-migration-db565f2335c2d8b2791215579dc616bc771acc49.tar
svn-git-migration-db565f2335c2d8b2791215579dc616bc771acc49.tar.gz
svn-git-migration-db565f2335c2d8b2791215579dc616bc771acc49.tar.bz2
svn-git-migration-db565f2335c2d8b2791215579dc616bc771acc49.tar.xz
svn-git-migration-db565f2335c2d8b2791215579dc616bc771acc49.zip
Make the author-map work without relative paths (like b2585bb)
-rwxr-xr-xscripts/mageia-import.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/mageia-import.sh b/scripts/mageia-import.sh
index 048ea63..1206b79 100755
--- a/scripts/mageia-import.sh
+++ b/scripts/mageia-import.sh
@@ -11,12 +11,18 @@ fi
BASESOFTWARE=$(basename $SOFTWARE)
if [ -d $BASESOFTWARE-origin ]; then
- echo "It seems the svn-git repository already exists ($BASESOFTWARE-origin)"
+ echo "It seems the svn-git repository already exists ($BASESOFTWARE-origin)" >&2
exit 1
fi
if [ -d $BASESOFTWARE.git ]; then
- echo "It seems the converted git repository already exists ($BASESOFTWARE.git)"
+ echo "It seems the converted git repository already exists ($BASESOFTWARE.git)" >&2
+ exit 1
+fi
+
+AUTHORMAP=$(realpath $(dirname $(realpath $0))/../metadata/mageia-user-map.txt)
+if [ ! -f "$AUTHORMAP" ]; then
+ echo "Cannot find author map." >&2
exit 1
fi
@@ -41,11 +47,11 @@ cd $BASESOFTWARE-origin
revision=0
if [ -n "$skiprevisions" ]; then
for rev in $skiprevisions; do
- git svn fetch -A ../authors-transform.txt -r $(( $revision + 1 )):$(( $rev - 1 ))
+ git svn fetch -A $AUTHORMAP -r $(( $revision + 1 )):$(( $rev - 1 ))
revision=$rev
done
fi
-git svn fetch -A ../authors-transform.txt -r $(( $revision + 1 )):HEAD
+git svn fetch -A $AUTHORMAP -r $(( $revision + 1 )):HEAD
git reset --hard trunk
echo
echo "done"