[cvsnt] audit and postgresql

David Somers dsomers at omz13.com
Tue May 23 16:55:31 BST 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


I've finally gotten around to enabling repository auditing on my system :-)

One slight hiccup: On my windows box when I try to create the tables using
the cvsnt control panel - 2.5.03.2330 - for postgresql,  I get a Script not
found error :-(

Also, it is possible to take the existing history/commit/tag logs and pop
them into the database?

BTW, when using postgresql, instead of using prefixes, it makes a bit more
sense to use the schema facility (see
http://www.postgresql.org/docs/current/static/ddl-schemas.html for more
info). This can be easily done by adding a period to the prefix, and
tweaking the creation script to be:

-- Postgres specific configuration script (using schemas!)
-- %PREFIX% assumed to have a trailing period.

CREATE SCHEMA %PREFIX%;

Create Table %PREFIX%SessionLog (Id Serial Primary Key Not Null,
        Command varchar(32),
        Date timestamp,
        Hostname varchar(256),
        Username varchar(256),
        SessionId varchar(32),
        VirtRepos varchar(256),
        PhysRepos varchar(256),
        Client varchar(64));

Create Table %PREFIX%CommitLog (Id Serial Primary Key Not Null,
        SessionId Integer,
        Directory varchar(256),
        Message text,
        Type char(1),
        Filename varchar(256),
        Tag varchar(64),
        BugId varchar(64),
        OldRev varchar(64),
        NewRev varchar(64),
        Added Integer,
        Removed Integer,
        Diff text);

Create Index Commit_SessionId On %PREFIX%CommitLog(SessionId);

Create Table %PREFIX%HistoryLog (Id Serial Primary Key Not Null,
        SessionId Integer,
        Type char(1),
        WorkDir varchar(256),
        Revs varchar(64),
        Name varchar(256),
        BugId varchar(64),
        Message text);

Create Index History_SessionId on %PREFIX%HistoryLog(SessionId);

Create Table %PREFIX%TagLog (Id Serial Primary Key Not Null,
        SessionId Integer,
        Directory varchar(256),
        Filename varchar(256),
        Tag varchar(64),
        Revision varchar(64),
        Message text,
        Action varchar(32),
        Type char(1));

Create Index Tag_SessionId on %PREFIX%TagLog(SessionId);

(It may be worth modifying the GUI so that when the database is postgresql
the label for prefix changes from 'prefix' to 'prefix/schema', and if the
prefix/schema has a trailing period then the above script should be used,
otherwise use the existing one.).

Greetings from (very rainy) Luxembourg.

-- 
David Somers
VoIP/SIP: FWD dial **44808449868206; voipuser.org dial 08449868206
PGP Key = 7E613D4E
Fingerprint = 53A0 D84B 7F90 F227 2EAB  4FD7 6278 E2A8 7E61 3D4E



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook