views:

68

answers:

3

Hi all,

I have next situation. I need to choise source control system for my project. This scs must provide the API to my .net application to get information about check-in-s for specified user and date period and about changes which was done in this check-in-s (the number of added and updated lines).

What source control system provides this functionality?

P.S. I can't use the TFS, it's a limitation..

+2  A: 

Take a look at using SubVersion and SharpSVN.

SharpSVN encapsulates client functionality for SVN and should have enough functions to cover your requirements. They also provide a wiki and forum for questions about how to use the library.

Also check out Git and GitSharp. Git is a distributed source control system, which I personally like very much. Once you get your mind around how it works it's a beaut to work with.

Mikael Svenson
+5  A: 

Aside from SharpSVN, which Mikael Svenson already mentioned, most source control systems should have a command-line client with output that you can easily parse, even if they don't have an "API" as such.

Therefore I'd suggest that you choose the best source control system based on other factors (such as reliability, ease of use and how well it fits your development process) and then look for a way to implement the metrics.

(As an aside, it's my highly subjective opinion that metrics from source control will not be very meaningful. I mean, they can be interesting to look at, but as soon as you have management trying to make any decisions based on them you're in trouble!)

Evgeny
+1 for the aside. Truer words have seldom been spoken!
Noufal Ibrahim
Guys, I agree with you, but it is a study project and I don't put the task.
w1z
+1 I would only use this to create rules/alerts if ppl were omitting comments etc. Which is built into TFS. Management and their kpi's ;)
Mikael Svenson
+1  A: 

I did some work with code change metrics and Subversion out of the box was of great help. It's command-line client can dump the log history in XML for convenient processing (in my case, using XSLT and SQL).

You can find more details on the PanBI Subversion page and get a feel for the kind of metrics I was interested in from the screencast showing an analysis of the Apache web server subversion history. Got the apache mailing list going for a couple of days. :)

Tomislav Nakic-Alfirevic
It souds good. But I nave not understand yet how to calculate added/updated lines of code by each file in some chech-in...
w1z
That's where the log file falls short: it's limited to metadata. As for the number of lines or characters, I could imagine iteratively invoking diff for every pair of neighbouring revisions and storing that alongside the revision, but I haven't had time to try it yet.
Tomislav Nakic-Alfirevic
Ok. Can you provide some another usefull links how to work with this functionality? Thanks!!
w1z
Nope, sorry. But it doesn't look like that much work to just go ahead and implement it along the above lines.
Tomislav Nakic-Alfirevic