Changes between Version 1 and Version 2 of TracLinks


Ignore:
Timestamp:
Jan 16, 2015, 11:11:06 AM (10 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v1 v2  
    11= Trac Links =
    22[[TracGuideToc]]
    3 [[TranslatedPages]]
    43
    54TracLinks are a fundamental feature of Trac, because they allow easy hyperlinking between the various entities in the system—such as tickets, reports, changesets, Wiki pages, milestones, and source files—from anywhere WikiFormatting is used.
     
    2928 Milestones :: `milestone:1.0`
    3029 Attachment :: `attachment:example.tgz` (for current page attachment), `attachment:attachment.1073.diff:ticket:944` (absolute path)
    31  Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`, `[1/repository]`
     30 Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`
    3231 Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk@1:3`, `[2:5/trunk]`
    3332 Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin@9128:9953`,
     
    4443 Milestones :: milestone:1.0
    4544 Attachment :: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944 (absolute path)
    46  Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk, [1/repository]
     45 Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk
    4746 Revision log :: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]
    4847 Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin@9128:9953,
     
    135134
    136135In order to link explicitly to a [=#toplevel toplevel] Wiki page,
    137 use the `wiki:/` prefix. Be careful **not** to use the `/` prefix alone, as this corresponds to the [#Server-relativelinks] syntax and with such a link you will lack the `/wiki/` part in the resulting URL. A link such as `[../newticket]` will stay in the wiki namespace and therefore link to a sibling page.
     136use the `wiki:/` prefix.
     137Be careful **not** to use the `/` prefix alone, as this corresponds to the
     138[#Server-relativelinks] syntax and with such a link you will lack the `/wiki/`
     139part in the resulting URL.
     140
     141''(Changed in 0.11)'' Note that in Trac 0.10, using e.g. `[../newticket]`  may have worked for linking to the `/newticket` top-level URL, but since 0.11, such a link will stay in the wiki namespace and therefore link to a sibling page.
     142See [#Server-relativelinks] for the new syntax.
    138143
    139144=== Link anchors ===
     
    307312 - `ticket:1,150`
    308313
     314''(since Trac 0.11)''
     315
    309316=== timeline: links ===
    310317
    311 Links to the timeline can be created by specifying a date in the ISO:8601 format. The date can be optionally followed by a time specification. The time is interpreted as being UTC time, but if you don't want to compute the UTC time, you can specify a local time followed by your timezone offset relative to UTC.
     318Links to the timeline can be created by specifying a date in the ISO:8601 format. The date can be optionally followed by a time specification. The time is interpreted as being UTC time, but alternatively you can specify your local time, followed by your timezone if you don't want to compute the UTC time.
    312319
    313320Examples:
     
    316323 - `timeline:2008-01-29T15:48Z`
    317324 - `timeline:2008-01-29T16:48+01`
    318  - `timeline:2008-01-29T16:48+0100`
    319  - `timeline:2008-01-29T16:48+01:00`
     325
     326''(since Trac 0.11)''
    320327
    321328=== wiki: links ===
     
    344351
    345352Finally, one can also highlight an arbitrary set of lines:
    346  - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103, and target line 99
    347  - or without version number (the `@` is still needed): `source:/some/file@:10-20,100,103#L99`. Version can be omitted when the path is pointing to a source file that will no longer change (like `source:/tags/...`), otherwise it's better to specify which lines of //which version// of the file you're talking about
     353 - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103.
     354   ''(since 0.11)''
    348355
    349356Note that in presence of multiple repositories, the name of the repository is simply integrated in the path you specify for `source:` (e.g. `source:reponame/trunk/README`). ''(since 0.12)''