Alex Rivera | Logout

Getting list of SVN users for Subversion -> Git migration?

Asked 2012-03-02T21:41:58.737
27

I've been looking over a few SVN -> Git migrations and they all mention getting a proper users list before migrating, specifically by using the command:

svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq

I have access to the Ubuntu server hosting the single repository (with 9 projects), but no SVN installation locally. Is it possible to run that command on the server to get the list of usernames? At the moment it just gives back the error:

svn: E155007: '/var/subversion/' is not a working copy
Edit
Report

1 Answer

33

Pass the path to the repository as a URL:

svn log -q file:///var/subversion | grep -e '^r' | awk -F '|' '{ print $2 }' | sort | uniq

By the way, if you need the list of authors in chronological order of first commit (I found it helpful once when converting from svn to git), you can do the following:

svn log -q -r 1:HEAD url://to/repo | grep '^r' | awk -F'|' '!x[$2]++{print$2}'
answered 2012-03-02T22:30:25.710

Your Answer