Changes between Version 8 and Version 9 of TracLinks


Ignore:
Timestamp:
Jan 12, 2016, 11:21:52 PM (4 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v8 v9  
    2828 Milestones :: `milestone:1.0`
    2929 Attachment :: `attachment:example.tgz` (for current page attachment), `attachment:attachment.1073.diff:ticket:944` (absolute path)
    30  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`
    3131 Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk@1:3`, `[2:5/trunk]`
    3232 Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin@9128:9953`,
     
    4343 Milestones :: milestone:1.0
    4444 Attachment :: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944 (absolute path)
    45  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
    4646 Revision log :: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]
    4747 Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin@9128:9953,
     
    134134
    135135In order to link explicitly to a [=#toplevel toplevel] Wiki page,
    136 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.
    137143
    138144=== Link anchors ===
     
    306312 - `ticket:1,150`
    307313
     314''(since Trac 0.11)''
     315
    308316=== timeline: links ===
    309317
    310 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.
    311319
    312320Examples:
     
    315323 - `timeline:2008-01-29T15:48Z`
    316324 - `timeline:2008-01-29T16:48+01`
    317  - `timeline:2008-01-29T16:48+0100`
    318  - `timeline:2008-01-29T16:48+01:00`
     325
     326''(since Trac 0.11)''
    319327
    320328=== wiki: links ===
     
    331339 ''aliases:'' `browser:`, `repos:`
    332340
    333 The default behavior for a `source:/some/path link` is to open the browser in that directory directory
     341The default behavior for a source:/some/path link is to open the browser in that directory directory
    334342if the path points to a directory or to show the latest content of the file.
    335343
     
    337345 - `source:/some/file@123` - link to the file's revision 123
    338346 - `source:/some/file@head` - link explicitly to the latest revision of the file
    339  - `source:/some/file@named-branch` - link to latest revision of the specified file in `named-branch` (DVCS such as Git or Mercurial)
    340347
    341348If the revision is specified, one can even link to a specific line number:
    342349 - `source:/some/file@123#L10`
    343350 - `source:/tag/0.10@head#L10`
    344  - `source:/some/file@named-branch#L10`
    345351
    346352Finally, one can also highlight an arbitrary set of lines:
    347  - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103, and target line 99
    348  - 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)''
    349355
    350356Note 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)''
     
    356362 * `export:123:/some/file` - get revision 123 of the specified file
    357363 * `export:/some/file@123` - get revision 123 of the specified file
    358  * `export:/some/file@named-branch` - get latest revision of the specified file in `named-branch` (DVCS such as Git or Mercurial).
    359364
    360365This can be very useful for displaying XML or HTML documentation with correct stylesheets and images, in case that has been checked in into the repository. Note that for this use case, you'd have to allow the web browser to render the content by setting `[browser] render_unsafe_content = yes` (see TracIni#browser-section), otherwise Trac will force the files to be downloaded as attachments for security concerns.
     
    370375 - `log:@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795
    371376 - `log:/trunk/tools@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 which affect the given path
    372  - `log:/tools@named-branch` - the revisions in `tools` starting from the latest revision in `named-branch` (DVCS such as Git or Mercurial)
    373377
    374378There are short forms for revision ranges as well: