Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For a given SVN repository I need to determine a list of all users who ever committed anything to that repository. This repository is not the only one on the SVN server, but the list should be restricted to that repository.

share|improve this question
    
Can you parse svn log for the users that have committed changes? Or is checking out the repo not an option? –  physicsmichael Apr 13 '10 at 4:41
    
Also, do you have python? =) –  physicsmichael Apr 13 '10 at 4:42

3 Answers 3

up vote 13 down vote accepted

While I started rewriting my python parsing, I realized a much better way to do what you asked (I parsed names and dates of submission to calculate weekend/weekday submission ratios to see who had no life!)

Check out the repo, then go to it and execute:

svn log | grep '^r[0-9]' | awk '{print $3}' | sort | uniq

That gets a list of all the changes that have been commited, greps for the lines that start with the revision and number (r[12341] | author | date-and-stuff... ), prints out the third field (author), sorts the authors and gets rid of duplicates.

share|improve this answer
    
thanks a lot for that! –  user12889 Apr 13 '10 at 23:18
    
@user12889: Your welcome. I just happened to see the right question at the right time. –  physicsmichael Apr 14 '10 at 4:34

Light form of @DrummerB answer for usernames with spaces, combined with simplicity of @vgm64

svn log -q | gawk -F "|" '/^r[0-9]/ { print $2 }' | sort -u

share|improve this answer

vgm64's answer is good, but it doesn't work well with names that contain spaces. I changed it, so it does:

svn log | grep '^r\do*' | sed 's_^r[0-9]* | \([^|]*\) | .*$_\1_g' | sort | uniq
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.