Changes between Version 3 and Version 4 of TracLinks
- Timestamp:
- Sep 28, 2015 7:22:15 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracLinks
v3 v4 134 134 135 135 In order to link explicitly to a [=#toplevel toplevel] Wiki page, 136 use the `wiki:/` prefix. 137 Be 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/` 139 part 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. 142 See [#Server-relativelinks] for the new syntax. 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. 143 137 144 138 === Link anchors === … … 312 306 - `ticket:1,150` 313 307 314 ''(since Trac 0.11)''315 316 308 === timeline: links === 317 309 … … 326 318 - `timeline:2008-01-29T16:48+01:00` 327 319 328 ''(since Trac 0.11)''329 330 320 === wiki: links === 331 321 … … 341 331 ''aliases:'' `browser:`, `repos:` 342 332 343 The default behavior for a source:/some/path linkis to open the browser in that directory directory333 The default behavior for a `source:/some/path link` is to open the browser in that directory directory 344 334 if the path points to a directory or to show the latest content of the file. 345 335 … … 347 337 - `source:/some/file@123` - link to the file's revision 123 348 338 - `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) 349 340 350 341 If the revision is specified, one can even link to a specific line number: 351 342 - `source:/some/file@123#L10` 352 343 - `source:/tag/0.10@head#L10` 353 354 Finally, one can also highlight an arbitrary set of lines ''(since 0.11)'': 344 - `source:/some/file@named-branch#L10` 345 346 Finally, one can also highlight an arbitrary set of lines: 355 347 - `source:/some/file@123:10-20,100,103#L99` - highlight lines 10 to 20, and lines 100 and 103, and target line 99 356 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 … … 364 356 * `export:123:/some/file` - get revision 123 of the specified file 365 357 * `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). 366 359 367 360 This 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. … … 377 370 - `log:@20788,20791:20795` - list revision 20788 and the revisions from 20791 to 20795 378 371 - `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) 379 373 380 374 There are short forms for revision ranges as well: