[cvsnt] CVS Server Side Reporting Tools?

Bo Berglund bo.berglund at telia.com
Sun Nov 16 21:42:07 GMT 2008


On Mon, 17 Nov 2008 06:58:08 +1100, "Arthur Barrett"
<arthur.barrett at march-hare.com> wrote:

>Bo,
>
>> >> - a CVSNT API through which one could call the 
>> >> database write functions to create the entries 
>> >> CVSNT Audit normally does for CVS
>> >> operations.
>> >
>> >Yes the CVSAPI already provides this, this is what I was 
>> originally suggesting.
>> >
>> >Or you could do as Tony suggested and call the audit trigger 
>> (which is a clean C API), the only trick there is getting the 
>> sequence right and the parameters right since it's designed 
>> to be called from CVSNT server during the commit/tag/whatever 
>> operation.  
>> >
>> I'm back at this again and I would like to know where I can get hold
>> of the CVSAPI documentation?
>
>I think Tony did start some docs, but I can't remember where... The best
>way to work out how to call the CVSAPI is to look at some program that
>already uses it. Eg: triggers/audit_trigger.cpp already calls all the
>database functions.  I'm not sure if the CVSAPI will be very easy to
>call from Pascal/Delphi since it uses pointers and structures quite
>heavily, and that is why I suggested you may want to call the audit.dll
>itself.

This is for database access to save the dug out information.
I'll have a look at the audit_trigger.cpp file to see if I understand
the methods.
If not I will simply make a function that works for MSSQLServer and
SQLite (which I can handle).
> 
>> I tried using DependencyWalker on the cvsapi.dll file to see the entry
>> points, but they are such that I cannot decode how to use them....
>
>Give me a clear idea of what you want to do (though I suppose I could
>guess...) and I'll try and write something basic up in an e-mail.

I thought it could give me direct access to cvs commands like:
ls     to list the files in the repository
log    to get info on each file therein
status to get more info on the files

>
>> What I think will be sufficient for the task at hand (filing the audit
>> database with old non-audited data) is access to the ls, log and
>> status calls to get the file structure out and then the data for each
>> file without using brute force by reading on filesystem level.
>
>I assume you mean to read the RCS data?  No - we have no API for that in
>CVSNT (though we do in EVS).
>
>The 'original' CVS did this by calling RCS - and you could do the same
>with CVSNT - call the CVSNT RCS wrappers to get the info, or you could
>just parse the output of the cvs commands (this is how we are handling
>migrate from CVSNT to EVS).
>

OK, I thought that CVSAPI wrapped the cvs calls into a usable
entrypoints for example with a structured call and return.

This way I would not have to get down to finding out how I can
programmatically call cvs to execute the commands (log, status and ls
as mentioned) in order to get the data from the RCS files. I don't
like the brute force way of the OP. He read the files themselves,
which I think is something one should not do given that the server
could not be active in such a case.
Going via the cvsnt server should result in a safer system....

Concerning access to the Audit database itself in order to store the
data into it, I thought that API would be a way to make the converter
not have to be database aware at all. It should just use the awareness
held in CVSNT instead.

I'll chug along at the pace allowed by my other obligations and such.

-- 

/Bo
(Bo Berglund, developer in Sweden)


More information about the cvsnt mailing list