Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine a developer's total contribution to SubVersion?

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?

like image 319
swilliams Avatar asked Aug 31 '09 16:08

swilliams


People also ask

What is Subversion in Devops?

Subversion (SVN) is a centralized SCM (Software Configuration Management) implementation. It allows to track changes and concurrent development on the same files. Subversion is centralized version Control system, meaning that it uses central server to store all files and enables team collaboration.

What is the use of SVN repository?

A Subversion repository — abbreviated SVN repository — is a database filled with your code, files, and other project assets. A SVN repository maintains a complete history of every change ever made.

What is SVN file?

SVN stands for Subversion. So, SVN and Subversion are the same. SVN is used to manage and track changes to code and assets across projects.

Is SVN distributed or centralized?

Apache Subversion, also known as Subversion, SVN represents the most popular centralized version control system on the market. With a centralized system, all files and historical data are stored on a central server. Developers can commit their changes directly to that central server repository.


2 Answers

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.

like image 63
Janusz Avatar answered Nov 06 '22 19:11

Janusz


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.

like image 36
Mark Rushakoff Avatar answered Nov 06 '22 19:11

Mark Rushakoff