diff options
author | Colin Guthrie <colin@mageia.org> | 2013-05-30 10:11:00 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-05-30 10:11:00 +0100 |
commit | b1314b6bb89c321830373266c84a965f171853dd (patch) | |
tree | 3caabf5920bfe2a3928520e3f1b4e9a1ed8a6584 /scripts | |
parent | ce30bb9324d70fed0f2bb44a0bca57737c1ae02d (diff) | |
download | svn-git-migration-b1314b6bb89c321830373266c84a965f171853dd.tar svn-git-migration-b1314b6bb89c321830373266c84a965f171853dd.tar.gz svn-git-migration-b1314b6bb89c321830373266c84a965f171853dd.tar.bz2 svn-git-migration-b1314b6bb89c321830373266c84a965f171853dd.tar.xz svn-git-migration-b1314b6bb89c321830373266c84a965f171853dd.zip |
Better handling of svn merge repo (do it out of tree)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mageia-reset-and-import.sh | 22 |
1 files changed, 12 insertions, 10 deletions
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." |