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 | Extension |
| Categories | Developers |
| 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 |
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:
| Bug# | Summary | Status | Opened By | Assigned To | Severity |
|---|---|---|---|---|---|
| #6744 | LDAP module on Fedora freezes dekihost upon login | new | MaxM | major | |
| #6523 | API service ends up crashing on Ubuntu 8.04 LTS | new | openseo | major | |
| #6356 | Visifire: update component to 2.2 | assigned | SteveB | SteveB | minor |
| #6254 | Dapp/PageBus demo is broken due to a JS error | assigned | SteveB | SteveB | minor |
| #6240 | Advanced Search Extension not returning results | assigned | coreyg | SteveB | minor |
| #6458 | HTTP Headers are not passed through to API | assigned | pt | Guerric | tweak |
| #6666 | void return type not supported for native extension functions | new | SteveB | minor | |
| #6442 | Allow extensions to have a restricted flag similar to UnSafeContent role flag | assigned | rion | SteveB | feature |
| #6524 | Media Extension automatically starts Windows files | new | coreyg | minor | |
| #6525 | Media Extension disappers in saved mode when scrolling | new | coreyg | minor | |
| #6496 | Advanced Search uses OR and not AND | assigned | bohappa | Guerric | major |
| #6495 | Google Calendar doesn't work for Private calendars | new | coreyg | minor | |
| #6486 | Config keys work only for new changes, not for all | new | DmitryA | tweak | |
| #5925 | Math Extension Gives Unhelpful Error in Response to Bad LaTex | assigned | barko192 | brianh | minor |
| #6405 | Field with username/IP does not contain search engine | new | DmitryA | minor | |
| #6422 | Unable to see deleted pages | new | DmitryA | minor | |
| #6295 | Advanced Search extension does not function properly on 9.02.1 | assigned | mcraven | SteveB | minor |
| #6293 | multiple posts to google maps not working | new | SteveB | minor | |
| #6111 | generalize Subversion extension regex for bug matching | assigned | maphew | MaxM | minor |
| #6275 | Google.gadget extension errors with "Google gadget must be originating from gmodules.com" | new | coreyg | minor |
| Revision | Date | Author | Message |
|---|---|---|---|
| r14876 | 6/22/2009 7:40:04 PM | steveb | Deki (trunk): * misc: replaced InvariantCulture with Ordinal for string comparisons |
| r12627 | 1/20/2009 5:42:55 PM | steveb | Deki (trunk): * misc: updated and normalized all copyright notices |
| r9961 | 8/13/2008 6:17:10 PM | maximm | Deki Extension - Subversion * Displayed date now uses the wiki's culture. 4766: SVN service: date format in subversion extension needs to use the wiki's language/culture settings Thanks http://wiki.developer.mindtouch.com/User:demonicus |
| r9748 | 8/1/2008 10:41:58 PM | steveb | Deki (trunk): DekiServices: * updated service-type in service blueprint (passive attribute that's not yet used anyway) |
| r9727 | 7/31/2008 7:11:51 PM | steveb | Deki (trunk): Services/Scripts`: * iframe.xml: new script added * updated all services/scripts to point their help URI to wiki.developer.mindtouch.com (instead of opengarden) |
| r8820 | 5/31/2008 4:07:18 PM | steveb | Deki Wiki (trunk): * redist: updated redistributable files * misc: * updated all occurrences of 'MindTouch Deki Wiki' to 'MindTouch Deki' * extended all copyright notices to 2008 |
| r8763 | 5/29/2008 6:06:42 PM | steveb | Deki Wiki (trunk): * misc: removed an extra space from the default copyright notice Tools: * DekiExt.php: added 'protocol' attribute to <uri> element * GoogleAppEngine: added sample application |
| r8290 | 4/27/2008 10:53:35 PM | steveb | Deki Wiki (trunk): * Misc: fixed xpath expressions * DekiXmlParser: * Xinha adds garbage to 'onclick', 'onblur', etc. attributes; detect it and remove it * only process edit links in main content body * remove 'class' and 'function' attributes on content before sending it to a function as input argument * PageBL: moved content validation methods to DekiScriptLibrary DekiServices: * DekiScriptService: convert script arguments to declared type * SubversionService: DON'T assume a default location for the SVN executable DekiScript: * Misc: added 'Convert()' method to convert from any DekiScriptLiteral to any other (when supported) * DekiScriptAccess: allow xpath expression on XML values * DekiScriptLibrary: * added 'safe' XHTML content definition * added 'web.checkuri' function to check for unsafe URIs * added 'web.checkstyle' function to check for unsafe styles * DekiScriptRuntime: * allow iterating over XML values * remove 'function' attribute on content before sending it to a function as input argument * xhtml-safe.txt, xhtml-unsafe.txt: allow 'function' attribute on 'img', 'ul', 'ol', and 'textarea' elements Tests: * fixed xpath expressions DesktopConnector: * fixed xpath expressions MWConverter-Test: * updated tests |
| r8192 | 4/21/2008 5:13:40 AM | steveb | DekiWiki (trunk): * updated DekiScript binary * MISC: updated all relevant SIDs to new shorter format (e.g. sid://mindtouch.com/2006/11/dekiwiki) (NOTE: old SIDS are preserved for backwards compatibility) * DekiXmlParser: evaluate attributes which have their value enclosed in double-curly braces |
| r7688 | 3/14/2008 8:37:52 PM | maximm | Deki JiraService MantisService SubversionService TracService * Updated div css classes |
| r7680 | 3/14/2008 7:18:55 PM | maximm | Deki SubversionService * Changed to css class DW-table SVN-table for the div * Added class bg1 or bg2 on the <tr> |
| r7662 | 3/12/2008 9:06:27 PM | maximm | Deki SubversionService * Added stoponcopy option. Default is true |
| r7615 | 3/6/2008 11:57:38 PM | maximm | LdapService, AdoDotNetService, SubversionService * LdapService.cs: dont kill the service if unable to contact the ldap server. * SubversionService.cs: tweaked the display of log message and bug fixes * AdoDotNetService.cs: added more verbose method descriptions |
| r7496 | 2/29/2008 12:44:35 AM | maximm | Deki Extensions Trac, Jira, Mantis, Subversion: * Added links to documentation |
| r7397 | 2/25/2008 8:15:49 PM | maximm | Deki extensions: MantisService and SubversionService MantisService: * Refactored to pass in output xdoc to inner functions to avoid Xdoc.Add calls * BuildBugLink now used for table as well as link now. Displaying reporter and handler as the hover-over title SubversionService: * Initial implementation allows "svn log" like output. * Revisions can optionally be linked to a web gui that display revision info (diffs, etc) * Bug numbers in log messages can be linked to a web based bug tracker. Bug prefixes: bug, fixes, bugfix, #123 |
| File | Size | Date | Attached by | |||
|---|---|---|---|---|---|---|
| SubversionService.cs Subversion extension source | 16.64 kB | 02:44, 11 Jul 2008 | mhenry07 | Actions | ||