From b1314b6bb89c321830373266c84a965f171853dd Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Thu, 30 May 2013 10:11:00 +0100 Subject: Better handling of svn merge repo (do it out of tree) --- scripts/mageia-reset-and-import.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'scripts') diff --git a/scripts/mageia-reset-and-import.sh b/scripts/mageia-reset-and-import.sh index d9a866d..fd74a61 100755 --- a/scripts/mageia-reset-and-import.sh +++ b/scripts/mageia-reset-and-import.sh @@ -155,15 +155,17 @@ find . -depth -not -iwholename '.' -not -iwholename "./.git" -not -iwholename ". # We have to create a subversion repository here for the import as we need a repository # for the svn merging below... svn sucks. -mkdir -p svn-sucks-balls/export -cd svn-sucks-balls/export +SVNPATH=$(realpath ../$SOFTWARE.svn) +rm -rf $SVNPATH +mkdir -p $SVNPATH/export +cd $SVNPATH/export svn export --force --ignore-keywords --ignore-externals -r $revision $NEWSVNURL/$SOFTWARE/trunk . -cd ../.. -svnadmin create svn-sucks-balls/repo -svnrepo=file://$(pwd)/svn-sucks-balls/repo -svn import -m "Import" svn-sucks-balls/export $svnrepo -svn checkout $svnrepo svn-sucks-balls/checkout -cd svn-sucks-balls/checkout +cd - +svnadmin create $SVNPATH/repo +svnrepo=file://$SVNPATH/repo +svn import -m "Import" $SVNPATH/export $svnrepo +svn checkout $svnrepo $SVNPATH/checkout +cd $SVNPATH/checkout if [ -n "$morerevisions" ]; then for rev in $morerevisions; do svn merge -c $rev --ignore-ancestry --accept theirs-full --allow-mixed-revisions $NEWSVNURL/$SOFTWARE/trunk . @@ -176,9 +178,9 @@ if [ -n "$morerevisions" ]; then fi done fi -cd ../.. +cd - svn export --force $svnrepo . -rm -rf svn-sucks-balls +rm -rf $SVNPATH echo echo "Dropping you to a shell. Use 'git status', 'git diff' and 'git add'." echo "DO NOT run 'git commit', I'll do that later for you." -- cgit v1.2.1