Created
April 25, 2012 03:01
-
-
Save timdream/2485851 to your computer and use it in GitHub Desktop.
git-svn conversion for moztw-web
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
[svn-remote "svn"] | |
url = http://svn.openfoundry.org/moztw | |
fetch = :refs/remotes/git-svn | |
[svn] | |
authorsfile = /home/timdream/repo/moztw/authors.txt | |
[remote "origin"] | |
url = git@github.com:moztw/svn.git | |
fetch = +refs/heads/*:refs/remotes/origin/* |
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
#!/bin/bash | |
# clone without normailze the author info | |
git svn clone http://svn.openfoundry.org/moztw svn | |
# get all authors from a cloned git-svn repo | |
git log --pretty=format:%an | sort | uniq > ../authors.txt | |
# clone | |
git svn -A authors.txt clone http://svn.openfoundry.org/moztw svn2 | |
# follow up svn changes | |
git svn -A ../authors.txt rebase | |
# do a svn commit (git log must be linear on master, do not do no-ff merge) | |
git commit; git svn -A ../authors.txt dcommit | |
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
git svn -A ../authors.txt rebase && git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment