Skip to content

Instantly share code, notes, and snippets.

@inz
Created April 19, 2011 12:56
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save inz/927466 to your computer and use it in GitHub Desktop.
Save inz/927466 to your computer and use it in GitHub Desktop.
List svn authors for easier migration to Git

List svn authors for easier migration to Git

Originally from "Creating a svn.authorsfile when migrating from subversion to git", http://technicalpickles.com/posts/creating-a-svn-authorsfile-when-migrating-from-subversion-to-git/

Minor update, so the generated output would be legal for a svn.authorsfile right away.

Note, however, that you SHOULD nevertheless provide the authors' full names and email addresses for a clean migration, i.e.:

svn_username = Firstname Lastname <address@domain.tld>

For a guide on how to actually migrate your SVN repository to Git, go to http://help.github.com/svn-importing/

Usage

In your SVN repository, run this:

bash < <(curl -s https://raw.github.com/gist/927466/git-list-svn-authors)
#!/usr/bin/env bash
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = ${author} <${author}>";
done
@tgenlschmidt
Copy link

Awesome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment