Created
April 21, 2011 09:05
-
-
Save torsten/934025 to your computer and use it in GitHub Desktop.
Prints a list of all committers in a subversion repository, sorted by number of commits.
This file contains 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 | |
# Prints a list of all committers in a subversion repository, | |
# sorted by number of commits. | |
# Written by Torsten Becker <[email protected]> in 2011 | |
if [[ ! $1 ]]; then | |
echo "Usage: $0 SVN-REPO-URL" | |
exit 1 | |
fi | |
tmpfile=/tmp/svn-stats-history.log | |
svn log "$1" > $tmpfile | |
cat $tmpfile | \ | |
ruby -ne 'puts $1 if $_ =~ /^r\d+ \| ([\w.]+) \|/' | \ | |
sort -u | \ | |
xargs -n1 -x sh -c \ | |
'cat '$tmpfile'|grep $0 |wc -l|ruby -ne "print \$_.strip";echo " $0"' | \ | |
sort -rn | |
rm -f $tmpfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment