[Teammetrics-discuss] Git and SVN Statistics update

Andreas Tille andreas at an3as.eu
Thu Jun 30 06:58:21 UTC 2011


On Thu, Jun 30, 2011 at 02:26:11AM +0530, Sukhbir Singh wrote:
> 
> + In the directory 'commit', you will find gitstat.py and svnstat.py,
> which handle Git and SVN repositories respectively. The code is
> simple, it's just calling the log programs and getting the output.

I tested gitstat with the teammetrics repository and commited a small
change which simplifies the authentication.  I was running gistat before
and after this change:

teammetrics=# SELECT * from gitstat 
teammetrics-# ;
 project |     name      | changes | lines_inserted | lines_deleted 
---------+---------------+---------+----------------+---------------
 foo     | Sukhbir Singh |      32 |            118 |           106
 foo     | sukhbir       |       1 |              6 |             0
(2 Zeilen)

teammetrics=# SELECT * from gitstat 
;
 project |     name      | changes | lines_inserted | lines_deleted 
---------+---------------+---------+----------------+---------------
 foo     | Sukhbir Singh |      32 |            118 |           106
 foo     | sukhbir       |       1 |              6 |             0
 foo     | Sukhbir Singh |      32 |            118 |           106
 foo     | Andreas Tille |       1 |              1 |             1
 foo     | sukhbir       |       1 |              6 |             0
(5 Zeilen)

This makes obvious that you need to clean up the table before injecting
new data.

> + I have changed the database name to teammetrics in archives.sql. Not
> important, but you should know it.

OK.
 
> + You can test out gitstat and svnstat. To run gitstat, just start it
> from a locally cloned Git repository.

See above.

> To test svnstat, modify the code
> and provide a SVN repository. You don't need root permissions to test
> either of these so go ahead.

Prints author names as expected.
 
> The log code remains the same, once we have a reply from Alioth
> administrators we will simply add a function that provides the script
> with the required repositories.

I just had the idea that you do not necessarily need to login from
somewhere else to Alioth.  You can put a CGI script on an Alioth account
(perhaps Blends group or whatever) and provide the logs (or preprocessed
data) via http to the host which is running the teammetrics database.
So there is no specific need for publishing any secret data.

> + Since the updatenames.py file is separate, we will call that for
> gitstat and svnstat both. All hail modularization!

Looks OK (untested).  But it obviosely needs extended to fetch
'sukhbir' in gitstat table. :-)

> I just hope that the Alioth administrators reply soon so that we can
> close this part within this week and start with UDD in the next.

Perhaps we can follow the web service approach I suggested above.  You
might create a (compressed) yaml file on Alioth and deliver it to the
script which included it into the database.

Kind regards

        Andreas.

-- 
http://fam-tille.de



More information about the Teammetrics-discuss mailing list