To link from Wiki pages to files in Subversion, use the SubversionLink macro. It creates a link to the file displayed by the ViewVC Subversion visualiser. This decouples your documentation from the visualiser, so if we change the visualiser (as I did when I installed viewvc instead of Trac) we can change this macro so that none of the wiki pages break because the visualiser URLs have changed.

The following Wiki markup creates this link: Tests for the NMEA0183 Module:

[[SubversionLink(Tests for the NMEA0183 Module, project=cityware, file=python-libs/nmea0183/nmea0183_tests.py)]]

Syntax

!SubversionLink(''text'', project=''project-name'', file=''file-path'', ''options'')

Options:

project=project-name

The name of the project

mandatory

file=file-path

The path of the file relative to the trunk or to the tag or branch if one is specified. E.g. no leading "/" character.

mandatory

tag=tag-name

The link points to the file in the given tagged version

optional (defaults to the trunk)

branch=branch-name

The link points to the file in the given branch

optional (defaults to the trunk)

rev=revision-number

The link points to the file in a specific revision of the repository

optional (defaults to HEAD)

view=view-type

Display the file as annotated HTML (view=markup) or in it's raw form (view=raw)

optional (defaults to markup), not applicable to directories

SubversionLinkMacro (last edited 2008-01-03 17:40:13 by localhost)