[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Compute some metrics on subversion repositories

From: Edmund Horner <chrysophylax_at_chrysophylax.cjb.net>
Date: 2004-01-27 06:18:46 CET

Jean-Louis Berliet wrote:

> What is the best way to compute some metrics on a subversion repository
> ?

Yeah, I've been working on a program that generates a report about a
repository, using a verbose XML log file.

> I want to determine these data :
> - number of octets between two dates for each user (ascii or binary
> files)
> optional :
> - number of lines between two dates (ascii files)
>
> Could i use the "svnadmin dump REPOS_PATH --incremental" xml file ? Is
> it reliable ?
> Could i use the python APIs to compute the datas ? How ?
>
> Thanks a lot.

 From my experience, the output of "svn log REPOS --xml -v" is reliable
for just about everything, except properties and file sizes. Though it
sounds like you need the file content.

You can use the dump file, but it's not XML! If it's a complete
dumpfile (from rev 0 onwards) then you can get as much data as you want
from it.

I have done some ad-hoc dump file parsing, but the preferred method is
to use libsvn_repos, just as svnadmin does. You set up hooks to process
each path in the file. Though, since you're interested in file changes,
you'll need to do diff'ing or something between revisions.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 27 06:20:13 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.