[Teammetrics-discuss] Git repositories parsing is ready.

Sukhbir Singh sukhbir.in at gmail.com
Tue Jul 12 17:07:54 UTC 2011


Hi,

(long post, please read when you have time)

repository.update() and this time you get to test the code as there
are no root permissions are required! But before testing, please read
further. First, everything is working the way we wanted it to and that
is good. But here are the points up for discussion:

1. Notice lines 24 and 25. We have to give a username / password as by
default the SSH private key is encrypted. To decrypt that, the
passphrase is required. We have two approaches here, you can decide
which one to follow:

- Either we save the password and let it decrypt the key (current approach)

OR

- We save the key in plain text after decrypting it and let the script
use the decrypted key.

Both approaches would involve setting the appropriate permissions so
that the password/ private key is not readable. But this is for you to
decide :-).

2. We need an account also for Alioth that will connect to it via SSH.
For now, you can test it with your Alioth account but this has to be
discussed -- which account do we use?

3. Please note the schema is now:

     Column     |  Type   | Modifiers
----------------+---------+-----------
 project        | text    |
 package        | text    |
 name           | text    |
 changes        | integer |
 lines_inserted | integer |
 lines_deleted  | integer |

project - name of the project, like debian-med
package - name of the package within a project, like 'ball' in 'debian-med'.
name - name of the author
changes - the frequency of commits
lines_inserted/ deleted - lines inserted/ deleted

I hope this is acceptable. Please let me know any changes if they are
to be made.

So for testing, fill in lines 24, 25 and update the schema for gistat
(The archives.sql will do it for you).

4. Also note that updatenames.py is called so the multiple names
problem are taken care of (if any).

5. Statistics:

teammetrics=# SELECT name, SUM(changes) FROM gitstat WHERE
project='teammetrics' GROUP BY name ORDER BY SUM DESC;
     name      | sum
---------------+-----
 Sukhbir Singh |  46
 Andreas Tille |   2


teammetrics=# SELECT name, SUM(changes) FROM gitstat WHERE
project='debian-med' GROUP BY name ORDER BY SUM DESC;

          name           | sum
-------------------------+------
 oliver                  | 3771
 amoll                   | 3724
 Andreas Hildebrandt     | 1103
 anker                   |  859
 Charles Plessy          |  689

It would be great if you could test some more repositories just to
confirm all is well.

6. How do we find out which VCS the team is using? I have a solution
but I am hoping we can do better. We try with SVN first URL and if
that fails, we try with Git/ SSH. And if that fails too, we throw up
an error. Good/ bad? Or we can perhaps get this from the UDD?

PS: If you commit anything, please make sure you do remove your
password from the script before committing. One tends to forget
sometimes.

Thanks for reading this long post! When you give the go ahead, I will
replace the print statements and implement logging support and
finalize this code.

-- 
Sukhbir



More information about the Teammetrics-discuss mailing list