Changes between Version 4 and Version 5 of RepoRevisionSyntaxPlugin


Ignore:
Timestamp:
Aug 5, 2010, 7:17:08 PM (14 years ago)
Author:
HumanInternals
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RepoRevisionSyntaxPlugin

    v4 v5  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = WikiSyntax for multiple repository revision =
     3= !WikiSyntax for multiple repository revision =
    44
    55== Description ==
    66
    7 When multiple repositories are configured, the 'r123' syntax doesn't enable you to specify the repository and the ![changeset:123:repo] or ![123/repo] syntax must be used instead. As I do find the 'r123' syntax more readable, I wrote this small plugin that lets you use 'r123repo' (simply add the repository name right after the changeset number), which is displayed as 'repo/!r123' with a link to the changeset. Parsing 'repo/!r123' syntax isn't possible (AFAIK) as the built-in parser parses the '!r123' part, so the syntax is 'r123repo' but it displayed as 'repo/!r123'.
     7When multiple repositories are configured, the 'r123' syntax doesn't enable you to specify the repository and the ![changeset:123:repo] or ![123/repo] syntax must be used instead. As I do find the 'r123' syntax more readable, I wrote this small plugin that lets you use 'r123repo' (simply add the repository name right after the changeset number), which is displayed as 'repo/!r123' with a link to the changeset. Parsing 'repo/!r123' syntax isn't possible (AFAIK) as the built-in parser parses the '!r123' part, so the syntax is 'r123repo' but it displays as 'repo/!r123'.
    88
    99== Bugs/Feature Requests ==
    1010
    11 I'm usually at #trac as shsek or shesek. My email is shesek at humaninternals /nospam/ com
     11I'm usually at #trac as shsek or shesek. My email is nadav at humaninternals /nospam/ com
    1212
    1313Existing bugs and feature requests for RepoRevisionSyntaxPlugin are
     
    2323== Source ==
    2424{{{
     25#!python
    2526from trac.core import *
    2627from trac.wiki import IWikiSyntaxProvider
     
    2930class RepoRevisionSyntax(Component):
    3031    implements(IWikiSyntaxProvider)
    31     # -- IWikiSyntaxProvider
    3232    def get_wiki_syntax(self):
    33         yield ( r'[r#](?P<rev_id>\d+)(?:\/|@)?(?P<repo>[a-zA-Z0-9_\/]+)', self._format_regex_link)
     33        yield ( r'[r#](?P<rev_id>\d+)(?P<repo>[a-zA-Z0-9_\/]+)', self._format_regex_link)
    3434    def _format_regex_link(self, formatter, ns, match):
    3535        return tag.a('%s/r%s' % (match.group('repo'), match.group('rev_id')),
     
    3939== Example ==
    4040
    41 'Fixed by r78trac' (as a ticket comment) would get displayed as 'Fixed by trac/!r78', 'trac/!r78' being a link to the changeset.
     41'Fixed by r78trac' (as a ticket comment) would !get displayed as 'Fixed by trac/!r78', 'trac/!r78' being a link to the changeset.
    4242
    4343== Recent Changes ==
     
    4747== Author/Contributors ==
    4848
    49 '''Author:''' [wiki:shesek] [[BR]]
     49'''Author:''' [wiki:shesek] / Nadav [[BR]]
    5050'''Maintainer:''' [wiki:shesek] [[BR]]
    51 '''Contributors:'''
     51'''Contributors:''' Jonathan