Skip to content

Instantly share code, notes, and snippets.

@mdavid
Created September 22, 2010 01:02
Show Gist options
  • Save mdavid/590911 to your computer and use it in GitHub Desktop.
Save mdavid/590911 to your computer and use it in GitHub Desktop.
Script to generate a git authors file from a Google Code SVN repository to use when importing a Google Code SVN repository into github. Can easily be adapted for any SVN repository by changing http://$PROJECTNAME.googlecode.com/svn to the proper base URI
PROJECTNAME=googlecode-project-name mkdir -p ~/.svn2git && echo "(no author) = name-of-replacement-for-no-author [email protected]" > ~/.svn2git/authors && for name in `svn log http://$PROJECTNAME.googlecode.com/svn | grep -E "r[0-9]+" | grep "|" | grep -v "(no author)" | awk '{print $3}' | sort | uniq`; do echo "$name = $name <[email protected]>" >> ~/.svn2git/authors; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment