Skip to content

Instantly share code, notes, and snippets.

@marcdomain
Forked from inz/README.mkd
Created August 16, 2020 16:12
Show Gist options
  • Save marcdomain/d4242de08ac0782c0b644a0e23743ab2 to your computer and use it in GitHub Desktop.
Save marcdomain/d4242de08ac0782c0b644a0e23743ab2 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 <[email protected]>

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment