How to count the number of changed or added lines in an SVN branch?
svn
Solution
Cosidering beginRev as the initial revision of the changeset you want to measure and endRev as the final revision:
svn diff --summarize -rbeginRev:endRev <URLtoBranch>
This will give you the output of files added, deleted and modified.
I you want more detail level you could parse the svn diff output through `diffstat`:
svn diff -rbeginRev:endRev <URLtoBranch> | diffstat
This will return an histogram of the changes with information for each file, and a summary of files changed, lines added and deleted.
Problem
I would like to add up the number of line changes in an SVN branch so I can tell how far I have gone during a project from another side and estimate the probability of conflict when I merge it with trunk. The way I can think of is to grab the unified diff and do some grep|wc -l hacks, but the problem is it's hard to separate different file types, for example, front-end source files (.css, .html) and back-end source files(.xml, .java)