How can I get statistics, how line count changed over time? I use bazaar for my project and it would be really nice to know, if I am refactoring code correctly.
Asked
Active
Viewed 384 times
3
-
You can get faster answers elsewhere.like on [SO] and [SU]. And may be considered offtopic here since it has nothing to do with ubuntu specifically. – Mahesh May 26 '12 at 19:35
-
This isn't off topic at all. In fact, this is a great place to find bazaar users as the Ubuntu project is a heavy user. – andrewsomething May 27 '12 at 16:58
2 Answers
2
There is also bzr-diffstat:
$ bzr diffstat -r 55..57
foo/bar.py | 2 +-
po/foo.pot | 56 ++++++++++++++++++---------
2 files changed, 38 insertions(+), 20 deletions(-)

andrewsomething
- 37,412
0
There is no built-in function for line count statistics.
But more importantly: to know if you're refactoring code correctly it is not count statistics you need but unit tests!
If you really want to know how line count changed over time, I think your best bet is write a simple Python program using bzrlib
, iterate over the revisions, count the lines in each revision and print it out or save in a file or database.
If you still need this and need a code sample, please leave a comment.

janos
- 4,888