Created
April 25, 2013 14:27
-
-
Save jurgenvinju/5460118 to your computer and use it in GitHub Desktop.
Shell script to migrate some SVN repository from Eclipse to github
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -e | |
repo=$1 | |
mkdir ${repo} | |
cd ${repo} | |
echo "Creating repo on github" | |
curl -u 'jurgenvinju' https://api.github.com/orgs/impulse-org/repos -d "{\"name\":\"${repo}\",\"has_wiki\": false,\"has_issues\": false}" | |
echo "Loading from Eclipse.org SVN" | |
svn2git https://dev.eclipse.org/svnroot/technology/org.eclipse.imp/trunk/org.eclipse.${repo} --username jvinju --authors ~/authors.txt --rootistrunk --verbose | |
echo "Pushing to github" | |
git remote add origin [email protected]:impulse-org/${repo}.git | |
git push -u origin master | |
cd .. | |
echo "Moving the repo" | |
svn move https://dev.eclipse.org/svnroot/technology/org.eclipse.imp/trunk/org.eclipse.${repo} https://dev.eclipse.org/svnroot/technology/org.eclipse.imp/trunk/moved_to_github/org.eclipse.${repo} -m "moved to github https://github.com/impulse-org/${repo}" | |
svn ls https://dev.eclipse.org/svnroot/technology/org.eclipse.imp/trunk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment