Changes between Version 4 and Version 5 of RepoRevisionSyntaxPlugin
- Timestamp:
- Aug 5, 2010, 7:17:08 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RepoRevisionSyntaxPlugin
v4 v5 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = WikiSyntax for multiple repository revision =3 = !WikiSyntax for multiple repository revision = 4 4 5 5 == Description == 6 6 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 display edas 'repo/!r123'.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 displays as 'repo/!r123'. 8 8 9 9 == Bugs/Feature Requests == 10 10 11 I'm usually at #trac as shsek or shesek. My email is shesekat humaninternals /nospam/ com11 I'm usually at #trac as shsek or shesek. My email is nadav at humaninternals /nospam/ com 12 12 13 13 Existing bugs and feature requests for RepoRevisionSyntaxPlugin are … … 23 23 == Source == 24 24 {{{ 25 #!python 25 26 from trac.core import * 26 27 from trac.wiki import IWikiSyntaxProvider … … 29 30 class RepoRevisionSyntax(Component): 30 31 implements(IWikiSyntaxProvider) 31 # -- IWikiSyntaxProvider32 32 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) 34 34 def _format_regex_link(self, formatter, ns, match): 35 35 return tag.a('%s/r%s' % (match.group('repo'), match.group('rev_id')), … … 39 39 == Example == 40 40 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. 42 42 43 43 == Recent Changes == … … 47 47 == Author/Contributors == 48 48 49 '''Author:''' [wiki:shesek] [[BR]]49 '''Author:''' [wiki:shesek] / Nadav [[BR]] 50 50 '''Maintainer:''' [wiki:shesek] [[BR]] 51 '''Contributors:''' 51 '''Contributors:''' Jonathan