wiki:TracSvnPoliciesPlugin

Svn policy interface

Description

This plugin offers a visual interface for adding svn hooks to the projects managed through Trac. The plugin is scalable for installations with multiple Trac environments.

Key features:

  • Add the email addresses to which the svn commit mails to be sent.
  • Enforce a svn log message format.
  • Enable the control of tickets from the svn commit messages.
  • Control the svn properties set for revisions.
  • Set the svn repository as readonly.
  • Write custom scripts to run at post-commit and pre-commit.

The plugin has a settings file svnpolicy.conf that must be configured before deployment.

Bugs/Feature Requests

Existing bugs and feature requests for TracSvnPoliciesPlugin are here.

If you have any issues, create a new ticket.

defect

1 / 5

enhancement

0 / 2

task

1 / 1

Download

Download the zipped source from here.

Source

You can check out TracSvnPoliciesPlugin from here using Subversion, or browse the source with Trac.

Installation

  • Get a archive with the plugin on your computer from here.
  • Edit the svnpolicy.conf configuration file - below are explained all the configurations.
  • Install the plugin with easy_install.
  • Add in your trac.ini file under the components section the following:
    [components]
    svnpolicies.* = enabled
    
  • Add the PROJECT_ADMIN permission to the user that should see this admin panel:
    trac-admin /var/trac/svnpolicyexample/ permission add andrei PROJECT_ADMIN
    

Configuration

The configuration file has the following settings:

  • TRAC_CODE_PATH - the path to the directory in which the trac code is stored. This setting is used to find on the file system the trac-post-commit-hook file, from the contrib directory.
  • AUTHOR_URL_TEMPLATE - this string is used to create the URL at which the author of the commit has its profile.
  • CHANGESET_URL - this string is used to create the URL at which the chageset with the commit can be found.
  • SVNNOTIFY - path on the file system where the svnnotify script can be found.
  • SVNLOOK - path on the file system where the svnlook script can be found.
  • SMTP_HOST - the server that sends emails for Trac.
  • SMTP_USER - the user with whom the Trac authenticates to the mail server.
  • SMTP_PASSWORD - the password with whom the Trac authenticates to the mail server.

Screenshots

Administration panel for the svn policies:

screenshoot of the plugin with the svn commit log message set

Settings for email notifications:

screenshoot of the plugin with the email notifications set at post-commit

Advanced settings for log messages during a commit:

screenshoot of the plugin with the a advanced script set to run at pre-commit

Disallow commits, ie make the svn repository read-only:

screenshoot of the plugin with the readonly switch enabled

Recent Changes

15259 by Committo-Ergo-Sum on 2016-02-10 16:18:39
The admin.py code assumed trac.ini always contains a "repository_dir" field, but this is not the case with Trac 1.0. This new version is compatible with 1.0 an older version.
15258 by Committo-Ergo-Sum on 2016-02-10 16:06:05
Creating Trunk from 0.11 version
3153 by andrei2102 on 2008-01-28 13:02:43
  • add the PROJECT_ADMIN permission
(more)

Author/Contributors

Author: andrei2102
Maintainer: Committo-Ergo-Sum
Contributors:

Last modified 9 months ago Last modified on Nov 19, 2015, 6:46:14 PM

Attachments (4)

  • readonly.jpg (125.5 KB) - added by andrei2102 9 years ago. screenshoot of the plugin with the readonly switch enabled
  • advanced.jpg (136.5 KB) - added by andrei2102 9 years ago. screenshoot of the plugin with the a advanced script set to run at pre-commit
  • notifications.jpg (165.5 KB) - added by andrei2102 9 years ago. screenshoot of the plugin with the email notifications set at post-commit
  • log.jpg (141.0 KB) - added by andrei2102 9 years ago. screenshoot of the plugin with the svn commit log message set

Download all attachments as: .zip