Subversion
C# source code attached. See How do I...Write my first extension in .Net? for compilation instructions.
I modified the MindTouch Subversion extension to add the following features:
Note: this has been tested only minimally so I'm just providing the source for now. Hope this is helpful and that some or all of these changes are eventually integrated back into the original extension.
If bug-regex is specified, it will override the following default bug id matching regular expression:
(?:bugfix|bug|fixes|\#)+(?:[\s|\W]*[0]*(?<bug>\d+))+
Use a capturing group around the actual bug id expression (other grouping should be non-capturing).
Note: if use-bugtraq-props is true and the bugtraq:logregex property is found then bugtraq:logregex will take precedence.
If the config key use-bugtraq-props is set to true, this extension will attempt to retrieve bugtraq:url and bugtraq:logregex properties from svn. These properties are discussed in the TortoiseSVN documentation under Integration with Bug Tracking Systems / Issue Trackers.
All configuration options from the original Subversion extension plus the following:
| Config Key | Description |
| bug-regex | Optional regular expression to match bug IDs in the log message. Example: [Ii]ssue(?:s)? #?(\d+) |
| use-bugtraq-props | Optional boolean to specify whether or not to retrieve bugtraq:url and bugtraq:logregex properties from svn (may have a performance impact). Default: false |
Below are the contents of the Subversion extension page:
| Vendor | MindTouch |
| Type | Native |
| Categories | Developer |
| Requires | MindTouch 1.9 or later |
| OS Restriction | None |
| Status | Stable |
| License | Free/Open Source |
| SID (service id) | sid://mindtouch.com/2008/02/svn |
| Assembly | mindtouch.deki.services |
Install Extension
Table of Contents
This extension contains functions for embeding Subversion (SVN) commit logs with automatic links to a bug tracker.
See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.
Configuration:
Before the Subversion service can be used, it must be configured.
| Config Key | Description |
| svn-uri | URI to the SVN repository. Example: https://dekiwiki.svn.sourceforge.net/svnroot/dekiwiki |
| username | Optional username for SVN repository |
| password | Optional password for SVN repository |
| path-to-svn | Path to the 'svn' binary on the file system. Default: /usr/bin/svn |
| bugs-uri | Optional URI to a bug tracker with the bug# replaced with '$1'. Example: http://bugs.opengarden.org/view.php?id=$1 |
| svn-revision-uri | Optional URI to a web based SVN revision viewer with the revision# replaced with '$1' . Example: http://dekiwiki.svn.sourceforge.net/...ev&revision=$1 |
Additional Information:
As for every extension, the subversion extension can be added several times, e.g. for different servers. To accomplish this, set the service preference "namespace". If it is set e.g. to "mysvn", the subversion service is being invoked by mysvn.table(...). If all repositories are on the same server, this is not needed, use the parameter "path" (see below) for this.
The SVN revision log from a given path. Bug numbers mentioned in the commit messages can be automatically linked to a bug tracking system
Parameters:
| Name | Type | Description |
| path | string | optional. Path within the repository to include |
| range | string | optional. Revision ranges to include. Same syntax as described in 'svn help log' |
| limit | int | optional. Limit the number of revisions returned |
| verbose | bool | optional. Show full log message or just the first line. (Default: false) |
Samples:
| File | Version | Size | Modified | |
|---|---|---|---|---|
| ||||
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by