问题
I'd like to be able to see someone's total lines of code contributed to our application. Say the app is 10k lines of code, I'd like to see the breakdown of how many LOC each developer has committed to the repository. Is there anything for SubVersion to get this kind of info?
回答1:
There is MPY SVN STATS and also StatSVN if I remember correctly that should do what you want and much more.
I don't think it can be done with tortoisesvn all the tools that I know are command line tools and I fear some of them linux tools.
回答2:
svn blame can get you started, by prepending the committer's name to each line of source code.
Their example output was
$ svn blame http://svn.red-bean.com/repos/test/readme.txt 3 sally This is a README file. 5 harry You should read this.
So you could do something like
cat ./*blamed | awk '{print $2}' | sort | uniq -c
on a file formed like
$ cat b.txt 3 Mark asdf 3 Mark asdf 3 Bill fdas 4 Bill fdas 5 Fred fdfd
to get output like
$ cat b.txt | awk '{print $2}' | sort | uniq -c
2 Bill
1 Fred
2 Mark
... but there's probably a cleaner way to do it than that.
来源:https://stackoverflow.com/questions/1358251/how-to-determine-a-developers-total-contribution-to-subversion