Created
November 30, 2011 18:41
-
-
Save cscorley/1410217 to your computer and use it in GitHub Desktop.
Convert directory of svn dumps to git repos
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/bash | |
# convert svn dumps located in ./svndumps/ into git repositories. | |
# assumes dump has basic svn top level structure of tags/, branches/, and trunk/, | |
# and authors.txt file of the svn committer id -> git committer id | |
# authors.txt example: | |
# csc = Christopher Corley <[email protected]> | |
# inspired by/credit to: http://sebastian.formzoo.com/2010/11/04/3-steps-convert-svn-dump-to-git/ | |
mkdir {svns, gits} | |
for repo in `ls ./svndumps/`; do | |
svnadmin create ./svns/${repo} | |
svnadmin load ./svns/${repo} < svndumps/${repo} | |
git svn clone file://${PWD}/svns/${repo} ./gits/${repo} --no-metadata -A authors.txt -t tags -b branches -T trunk | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment