| 1 | = InterTrac Extension for TracLinks = |
| 2 | |
| 3 | ''(since [milestone:0.10])'' |
| 4 | |
| 5 | == Definitions == |
| 6 | |
| 7 | An InterTrac link is used for referring to a Trac object |
| 8 | (Wiki page, changeset, ticket, ...) located in another |
| 9 | Trac environment. |
| 10 | |
| 11 | == Link Syntax == |
| 12 | |
| 13 | {{{ |
| 14 | <target_environment>:<TracLinks> |
| 15 | }}} |
| 16 | |
| 17 | The link is composed by the target environment name, |
| 18 | followed by a colon (e.g. `trac:`), |
| 19 | followed by a regular TracLinks, of any flavor. |
| 20 | |
| 21 | That target environment name is either the real name of the |
| 22 | environment, or an alias for it. |
| 23 | The aliases are defined in `trac.ini` (see below). |
| 24 | The prefix is case insensitive. |
| 25 | |
| 26 | For convenience, there's also an alternative short-hand form, |
| 27 | where one can use an alias as an immediate prefix |
| 28 | for the identifier of a ticket, changeset or report: |
| 29 | (e.g. `#T234`, `[T1508]`, `[trac 1508]`, ...) |
| 30 | |
| 31 | == Examples == |
| 32 | |
| 33 | Besides the other environments run by the same server process |
| 34 | (called ''sibling'' environments), which are automatically detected, |
| 35 | (''Note: currently only in `tracd`''), |
| 36 | it is necessary to setup a configuration for the InterTrac facility: |
| 37 | * in order to refer to a remote Trac |
| 38 | * for defining environment aliases |
| 39 | |
| 40 | This is done quite simply in an `[intertrac]` section |
| 41 | within the `trac.ini` file. |
| 42 | |
| 43 | Example configuration: |
| 44 | {{{ |
| 45 | ... |
| 46 | [intertrac] |
| 47 | ## -- Example of setting up an alias: |
| 48 | t = trac |
| 49 | |
| 50 | ## -- Link to an external Trac: |
| 51 | trac.title = Edgewall's Trac for Trac |
| 52 | trac.url = http://projects.edgewall.com/trac |
| 53 | |
| 54 | #trac.svn = http://repos.edgewall.com/projects/trac |
| 55 | # Hint: .svn information could be used in the future to support svn:externals... |
| 56 | }}} |
| 57 | |
| 58 | Now, given this configuration, one could create the following links: |
| 59 | * to the current InterTrac page: |
| 60 | * `trac:wiki:InterTrac` -> |
| 61 | [http://projects.edgewall.com/trac/wiki/InterTrac trac:wiki:InterTrac] |
| 62 | * `t:wiki:InterTrac` -> |
| 63 | [http://projects.edgewall.com/trac/wiki/InterTrac t:wiki:InterTrac] |
| 64 | * Keys are case insensitive: `T:wiki:InterTrac` -> |
| 65 | [http://projects.edgewall.com/trac/wiki/InterTrac T:wiki:InterTrac] |
| 66 | * to the ticket #234: |
| 67 | * `trac:ticket:234` -> |
| 68 | [http://projects.edgewall.com/trac/ticket/234 trac:ticket:234] |
| 69 | * `trac:#234` -> |
| 70 | [http://projects.edgewall.com/trac/ticket/234 trac:#234] |
| 71 | * `#T234` -> |
| 72 | [http://projects.edgewall.com/trac/search?q=#234 #T234] |
| 73 | * to the changeset [1912]: |
| 74 | * `trac:changeset:1912` -> |
| 75 | [http://projects.edgewall.com/trac/changeset/1912 trac:changeset:1912] |
| 76 | * `trac:[1912]` -> |
| 77 | [http:"//projects.edgewall.com/trac/search?q=[1912]" "trac:[1912]"] |
| 78 | * `[T1912]` -> |
| 79 | [http://projects.edgewall.com/trac/changeset/1912 "[T1912]"] |
| 80 | |
| 81 | Anything not given as explicit links (intertrac_prefix:module:id) |
| 82 | is interpreted by the remote Trac, relying on its quickjump |
| 83 | facility. |
| 84 | |
| 85 | ---- |
| 86 | See also: TracLinks, InterWiki |