How could I check how many lines of code have been committed to my SVN repository across all commits?
            Asked
            
        
        
            Active
            
        
            Viewed 2,789 times
        
    2
            
            
        - 
                    You mean all lines in commited file, or lines changed in commited file? – Svisstack Apr 19 '10 at 20:47
 - 
                    5you might try http://www.statsvn.org/, it's not perfect, but it will show you roughly what you want – karoberts Apr 19 '10 at 20:49
 - 
                    All lines in the most up to date committed files. – AFK Apr 19 '10 at 21:10
 - 
                    thanks, statsvn does give me basically what I was looking for. – AFK Apr 19 '10 at 21:10
 
1 Answers
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