summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-06-13 09:35:19 +0100
committerColin Guthrie <colin@mageia.org>2013-06-13 09:35:19 +0100
commitc7c92160e6fad7629e69f358b77cae10a6f0951c (patch)
tree5f567e939c5ddfc421b9df2cf478729b68fa4d40
parent853c8ebcc561416aae6a8e3b66ef2539d18fe2c9 (diff)
downloadsvn-git-migration-c7c92160e6fad7629e69f358b77cae10a6f0951c.tar
svn-git-migration-c7c92160e6fad7629e69f358b77cae10a6f0951c.tar.gz
svn-git-migration-c7c92160e6fad7629e69f358b77cae10a6f0951c.tar.bz2
svn-git-migration-c7c92160e6fad7629e69f358b77cae10a6f0951c.tar.xz
svn-git-migration-c7c92160e6fad7629e69f358b77cae10a6f0951c.zip
The branches are not stored in a branches subfolder.
This casues the SQL parsing to skip these files. Thus we have to handle the branches separately and be careful to exclude trunk while doing so.
-rwxr-xr-xscripts/mageia-reset-and-import.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh
index 4d7dbcc..b50e5f1 100755
--- a/scripts/mageia-reset-and-import.sh
+++ b/scripts/mageia-reset-and-import.sh
@@ -421,9 +421,14 @@ revmap=".git/svn/refs/remotes/trunk/.rev_map.$OLDSVNUUID"
if [ -f "$revmap" ]; then
parsesvnrevmap "$revmap" "mdv" "" $resetsha1 >>"$sql"
fi
-for revmap in $(find .git/svn/refs/remotes/{tags,branches} -name .rev_map.$OLDSVNUUID 2>/dev/null); do
+for revmap in $(find .git/svn/refs/remotes/tags -name .rev_map.$OLDSVNUUID 2>/dev/null); do
+ # Note, still pass in the tag name in case the tag is really more of a branch...
parsesvnrevmap "$revmap" "mdv" "$(echo $revmap | cut -d'/' -f6)" >>"$sql"
done
+for revmap in $(find .git/svn/refs/remotes -maxdepth 2 -not -iwholename ".git/svn/refs/remotes/trunk/.rev_map.*" -name .rev_map.$OLDSVNUUID 2>/dev/null); do
+ parsesvnrevmap "$revmap" "mdv" "$(echo $revmap | cut -d'/' -f5)" >>"$sql"
+done
+
# Inject the squashed commits into the map
for rev in $squashedrevs $morerevisions; do
@@ -440,9 +445,13 @@ revmap=".git/svn/refs/remotes/trunk/.rev_map.$NEWSVNUUID"
if [ -f "$revmap" ]; then
parsesvnrevmap "$revmap" "mga" "" $fakesha1 >>"$sql"
fi
-for revmap in $(find .git/svn/refs/remotes/{tags,branches} -name .rev_map.$NEWSVNUUID 2>/dev/null); do
+for revmap in $(find .git/svn/refs/remotes/tags -name .rev_map.$NEWSVNUUID 2>/dev/null); do
+ # Note, still pass in the tag name in case the tag is really more of a branch...
parsesvnrevmap "$revmap" "mga" "$(echo $revmap | cut -d'/' -f6)" >>"$sql"
done
+for revmap in $(find .git/svn/refs/remotes -maxdepth 2 -not -iwholename ".git/svn/refs/remotes/trunk/.rev_map.*" -name .rev_map.$NEWSVNUUID 2>/dev/null); do
+ parsesvnrevmap "$revmap" "mga" "$(echo $revmap | cut -d'/' -f5)" >>"$sql"
+done
xz "$sql"