2

How could I check how many lines of code have been committed to my SVN repository across all commits?

AFK
  • 4,333
  • 4
  • 23
  • 22

1 Answers1

1

If you don't want to use statsvn.org, what you need to do is get the files that was modified in the last N minutes and then run wc -l, for example:

#!/bin/bash

LINES=0
SVNROOT=/path/to/svn/repo
MMIN=-5

for f in `find $SVNROOT -type f -mmin $MMIN`; do
    FILE_LINES=$(cat $f | wc -l)
    LINES=$((LINES + FILE_LINES))
done

echo "LINES COMMITTED IN THE LAST $MMIN MINUTES: $LINES"
webbi
  • 841
  • 7
  • 14