Login | Register
My pages Projects Community openCollabNet

repoguard
Wiki: Configuration

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

How to configure RepoGuard

Configuration Location

There exists two configuration files. The first one is a global configuration file which is applied to all svn projects, located in %pathtorepoguard%/cfg/templates/global.tpl.conf. The second one is a project specific location and is located in the hooks directory of your svn repository: %pathtohooks%/repoguard.conf. Values from the global configuration file cannot be overwritten in the local ones.

Configuration by Example

Here you can see a sample configuration file.

The configuration is divided into 4 parts

vcs = svn

At first you have to assign the used version control system (vcs). At present there is only subversion (svn) supported.

The next part is the so called profiles section. In this section it is possible to define pre- and postcommit actions for different paths in your repository (TODO for me: describe another profile). The default profile handles all commits which are not caught by another profile. This also means that if you only want one profile you have to use the default one.

A profile constists of two different parts, one for precommit and one for postcommit actions.

The first entry (default = delayonerror) provides information for dealing with errors in checks. There are three different options:

  • abortonerror

which is the default option. It means the immediate abort of the whole check process and also the abort of the commit if an error occurs.

  • delayonerror

should be used if the developers wants to go through all checks even if one or more returning an error. The commit is aborted after all checks where executed.

  • warning

In case of an check returning an error nothing is aborted.

[profiles]
        [[default]]
                [[[precommit]]]
                default = delayonerror
                checks = Mantis.default, PyLint.default.abortonerror, Log
                success = Mantis.default, Mail.default
                error = Console, File.default, Mail.default
                [[[postcommit]]]
                checks = ,
                success = ViewVC.default,
                error = ,

[checks]
        [[PyLint]]
                [[[default]]]
                pylintrc = ${hooks}/pylintrc
        [[Mantis]]
                [[[default]]]
                url = https://some_url/mantis/mc/mantisconnect.php?wsdl
                user = some_user
                password = some_password
                check_in_progress = False
                check_handler = False

[handlers]
        [[File]]
                [[[default]]]
                file = ${hooks}/error.log

        [[Mail]]
                [[[default]]]
                addresses = important_developer@nice-company.com, another_developer@nice-company.com
                sender = repoguard@nice-company.com
                smtp.server = smtp.nice-company.com
                smtp.user = some_user
                smtp.password = some_password

        [[Mantis]]
                [[[default]]]
                protocol.include = Log,
                url = https://some_url/mantis/mc/mantisconnect.php?wsdl
                user = some_user
                password = some_password


        [[ViewVC]]
                [[[default]]]
                svndbadmin_bin = /path/to/viewvc-1.1.0-beta1/bin/svndbadmin

Configuration (last edited 2012-08-07 10:57:22 -0700 by ?schlauch)