Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there an SVN command that I can run to see a tally of all of my contributions? Something like:

added 1800
deleted 15
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

I don't know about a single SVN command, but this seems to work:

svn log ${SVNURL} | awk '$1~/^r/ && $3=="username"{print $1}' | tr -d r |
while read rev; do svn diff -c $rev ${SVNURL}; done |
awk '/^\+\+\+/ || /^---/ {} /^\+/ {a++} /^-/ {d++} END {print a, "additions"; print d, "deletions"}'

Use your username instead of "username".

share|improve this answer
    
Any sufficiently complicated diff stats gathering script contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of diffstat? –  ninjalj Mar 2 '11 at 19:37
add comment

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.