Is there a Sourcesafe API to get generic lines of code in source control?

I want to be able to get the projects I have in Sourcesafe and their shared lines of code (possibly also with the total number of classes, etc.). Is there an SDK for Sourcesafe (I'm using the 2005 version) that will allow me to do this?

Or is there a document in Sourcesafe that lists all projects in SS? Using this I could work to get the row count.

thank

0


source to share


4 answers


There is no specific API for counting rows. There is an API for accessing files, but too slow.



It would probably be better if you create a shadow folder in the root project (this is done using the admin tool). A simple application can then open all source files recursively from the shadow folder and do a line count.

+3


source


I understand that this is not exactly what you are asking for, but you can adapt the following to suit your needs:

http://richnewman.wordpress.com/2007/07/01/c-and-vbnet-line-count-utility/



I've used this before and it works really well. It also features comments and auto-generated code.

+1


source


You will need to get each file and count the number of lines.

0


source


I don't need an API to count the number of rows in a class. This is easy to do and I know several ways.

Rather, it would be nice to have a collection of files stored in SS, so I can run a line count for each file.

However, I think I could just tag the parent parent root directory with a tag like projectnameISSOURCESAFECHECKEDIN and for each folder (and only the parent folder) I will loop through and count the rows in the classes. Not a perfect solution, but efficient and independent of any API.

Anthony,

Your solution is trustworthy too. :)

0


source







All Articles