Created
May 22, 2010 23:18
-
-
Save matthew-brett/410448 to your computer and use it in GitHub Desktop.
This file contains 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
# Checkin from SVN - using a local copy I had to hand | |
cat > authors.txt << EOF | |
mcc = Michael Castelle <[email protected]> | |
jdh2358 = John Hunter <[email protected]> | |
michael.castelle = Michael Castelle <[email protected]> | |
jarrod.millman = Jarrod Millman <[email protected]> | |
EOF | |
git svn clone --authors-file=authors.txt file:///home/mb312/backups/nipy-svn/ni/pbrain/trunk pbrain-svn | |
# commit list from git log --pretty="%h" | |
# 51eacd2 | |
# dd21928 | |
# 8febb7b | |
# b7bf7d6 | |
# 2a89ca1 | |
# 62cbee7 | |
# 44b6e9e | |
cd pbrain-svn | |
# make branch from second commit in svn tree (first substantial commit) | |
git branch svn-start 62cbee7 | |
# Checkins from (older) CVS | |
cd .. | |
git cvsimport -C pbrain-cvs -A authors.txt -v -z3 -d :pserver:[email protected]:/cvsroot/pbrain pbrain | |
# Add SVN as remote to CVS | |
cd pbrain-cvs | |
git remote add svn ../pbrain-svn | |
git fetch svn | |
# in CVS tree - make new branch for working | |
git co -b for-upload | |
# patch current state against first substantial checkin in SVN | |
git diff -R svn/svn-start > svn_start.patch | |
patch -p1 < svn_start.patch | |
git add . | |
git commit -a --reuse-message svn/svn-start | |
# switch to svn and make patch files | |
git co -b svn-top svn/master | |
git format-patch svn/svn-start | |
# switch back to cvs-based branch, apply patches | |
git co for-upload | |
git am 00* | |
# clean out working tree including patches | |
git clean -f | |
# Done, maybe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment