Tuesday, May 10, 2005
More statistics
I've got the basic statistics generating code for svn done. Some testing is in order, but it seems to work.
A few minor frustrations/learning opportunities. If you svn log -r [rev] [path] you get a nice formatted log. If you --xml, it spits it out in xml format, for which I've written a nice parser in php (bleh). So I figured in the name of code reuse and efficiency (laziness) I could use the php class to generate the statistics. Well, no. the --xml arg does everything as expected except include the lines changed count, which I need. So back to perl and lines like
if ($i =~ /^r\d*\s\S\s(\S*)\s\S\s(\d*\D\d*\D\d*\D\d*\D\d*).*\|\s(\d*)/) {
So as to keep my good name with the admins, and not be blacklisted while I run loops through a week's worth of commits, I set up the local svn mirror. rsync.kde.org::svnmirror has what I needed, so I did the rsync, went to work, came home, went to bed, went to work came home and it was done. So I tested with svn log file:///home/extra/kde_svn and got the same error that anonsvn.kde.org users got last week. The rsync seems to fetch the repos/db/current file near the end, which indicates the last commit. It was out of sync with the fetched revisions, hence the error message. A quick rsync fixed the problem.
How big is the KDE svn repository in fsfs format?
@:/home/extra$ du -hc kde_svn 12K kde_svn/dav 1.6G kde_svn/db/revprops 13G kde_svn/db/revs 64M kde_svn/db/transactions/411053-1.txn 64M kde_svn/db/transactions 14G kde_svn/db 8.0K kde_svn/html 4.0K kde_svn/locks 14G kde_svn 14G total @:/var/www$ du -hc kde_repository ... 19G kde_repository 19G total
The second set of numbers is the cvs repository. Kudos again to the svn migration team for preserving the important stuff, but mucking out the unnecessary cruft.
Subscribe to Posts [Atom]