ˆà | 1 | = InterTrac Links =ˆà |
ˆà | 2 | ˆà |
ˆà | 3 | Trac supports a convenient way to refer to resources of other Trac servers, from within the Wiki markup, since version 0.10.ˆà |
ˆà | 4 | ˆà |
ˆà | 5 | == Definitions ==ˆà |
ˆà | 6 | ˆà |
ˆà | 7 | An InterTrac link can be seen as a scoped TracLinks.ˆà |
ˆà | 8 | It is used for referring to a Trac resource ˆà |
ˆà | 9 | (Wiki page, changeset, ticket, ...) located in anotherˆà |
ˆà | 10 | Trac environment.ˆà |
ˆà | 11 | ˆà |
ˆà | 12 | == List of Active InterTrac Prefixes ==ˆà |
ˆà | 13 | ˆà |
ˆà | 14 | [[InterTrac]]ˆà |
ˆà | 15 | ˆà |
ˆà | 16 | == Link Syntax ==ˆà |
ˆà | 17 | ˆà |
ˆà | 18 | Simply use the name of the other Trac environment as a prefix, ˆà |
ˆà | 19 | followed by a colon, ending with the resource located in the other environment.ˆà |
ˆà | 20 | ˆà |
ˆà | 21 | {{{ˆà |
ˆà | 22 | <target_environment>:<TracLinks>ˆà |
ˆà | 23 | }}}ˆà |
ˆà | 24 | ˆà |
ˆà | 25 | The other resource is specified using a regular TracLinks, of any flavor.ˆà |
ˆà | 26 | ˆà |
ˆà | 27 | That target environment name is either the real name of the ˆà |
ˆà | 28 | environment, or an alias for it. ˆà |
ˆà | 29 | The aliases are defined in `trac.ini` (see below).ˆà |
ˆà | 30 | The prefix is case insensitive.ˆà |
ˆà | 31 | ˆà |
ˆà | 32 | When a TracLink is enclosed in brackets, the alias is expanded. That is, `[th:ticket:1]` is displayed as `trachacks:ticket:1`, since `th` is an alias for `trachacks`. If the TracLink is not enclosed in brackets, then the alias is displayed as it is typed.ˆà |
ˆà | 33 | ˆà |
ˆà | 34 | For convenience, there's also some alternative short-hand form, ˆà |
ˆà | 35 | where one can use an alias as an immediate prefix ˆà |
ˆà | 36 | for the identifier of a ticket, changeset or report:ˆà |
ˆà | 37 | (e.g. `#T234`, `[T1508]`, `[trac 1508]`, ...)ˆà |
ˆà | 38 | ˆà |
ˆà | 39 | == Examples ==ˆà |
ˆà | 40 | ˆà |
ˆà | 41 | It is necessary to setup a configuration for the InterTrac facility.ˆà |
ˆà | 42 | This configuration has to be done in the TracIni file, `[intertrac]` section.ˆà |
ˆà | 43 | ˆà |
ˆà | 44 | Example configuration:ˆà |
ˆà | 45 | {{{ˆà |
ˆà | 46 | ...ˆà |
ˆà | 47 | [intertrac]ˆà |
ˆà | 48 | # -- Example of setting up an alias:ˆà |
ˆà | 49 | t = tracˆà |
ˆà | 50 | ˆà |
ˆà | 51 | # -- Link to an external Trac:ˆà |
ˆà | 52 | trac.title = Edgewall's Trac for Tracˆà |
ˆà | 53 | trac.url = http://trac.edgewall.orgˆà |
ˆà | 54 | }}}ˆà |
ˆà | 55 | ˆà |
ˆà | 56 | The `.url` is mandatory and is used for locating the other Trac.ˆà |
ˆà | 57 | This can be a relative URL in case that Trac environment is located ˆà |
ˆà | 58 | on the same server.ˆà |
ˆà | 59 | ˆà |
ˆà | 60 | The `.title` information will be used for providing an useful tooltipˆà |
ˆà | 61 | when moving the cursor over an InterTrac links.ˆà |
ˆà | 62 | ˆà |
ˆà | 63 | Finally, the `.compat` option can be used to activate or disableˆà |
ˆà | 64 | a ''compatibility'' mode:ˆà |
ˆà | 65 | * If the targeted Trac is running a version below [trac:milestone:0.10 0.10] ˆà |
ˆà | 66 | ([trac:r3526 r3526] to be precise), then it doesn't know how to dispatch an InterTrac ˆà |
ˆà | 67 | link, and it's up to the local Trac to prepare the correct link. ˆà |
ˆà | 68 | Not all links will work that way, but the most common do. ˆà |
ˆà | 69 | This is called the compatibility mode, and is `true` by default. ˆà |
ˆà | 70 | * If you know that the remote Trac knows how to dispatch InterTrac links, ˆà |
ˆà | 71 | you can explicitly disable this compatibility mode and then ''any'' ˆà |
ˆà | 72 | TracLinks can become an InterTrac link.ˆà |
ˆà | 73 | ˆà |
ˆà | 74 | Now, given the above configuration, one could create the following links:ˆà |
ˆà | 75 | * to this InterTrac page:ˆà |
ˆà | 76 | * `trac:wiki:InterTrac` trac:wiki:InterTracˆà |
ˆà | 77 | * `t:wiki:InterTrac` t:wiki:InterTracˆà |
ˆà | 78 | * Keys are case insensitive: `T:wiki:InterTrac` T:wiki:InterTracˆà |
ˆà | 79 | * to the ticket #234:ˆà |
ˆà | 80 | * `trac:ticket:234` trac:ticket:234ˆà |
ˆà | 81 | * `trac:#234` trac:#234 ˆà |
ˆà | 82 | * `#T234` #T234ˆà |
ˆà | 83 | * to the changeset [1912]:ˆà |
ˆà | 84 | * `trac:changeset:1912` trac:changeset:1912ˆà |
ˆà | 85 | * `[T1912]` [T1912]ˆà |
ˆà | 86 | * to the log range [3300:3330]: '''(Note: the following ones need `trac.compat=false`)'''ˆà |
ˆà | 87 | * `trac:log:@3300:3330` trac:log:@3300:3330 ˆà |
ˆà | 88 | * `[trac 3300:3330]` [trac 3300:3330] ˆà |
ˆà | 89 | * finally, to link to the start page of a remote trac, simply use its prefix followed by ':', inside an explicit link. Example: `[th: Trac Hacks]` (''since 0.11; note that the ''remote'' Trac has to run 0.11 for this to work'')ˆà |
ˆà | 90 | ˆà |
ˆà | 91 | The generic form `intertrac_prefix:module:id` is translatedˆà |
ˆà | 92 | to the corresponding URL `<remote>/module/id`, shorthand linksˆà |
ˆà | 93 | are specific to some modules (e.g. !#T234 is processed by theˆà |
ˆà | 94 | ticket module) and for the rest (`intertrac_prefix:something`),ˆà |
ˆà | 95 | we rely on the TracSearch#quickjump facility of the remote Trac.ˆà |
ˆà | 96 | ˆà |
ˆà | 97 | ----ˆà |
ˆà | 98 | See also: TracLinks, InterWikiˆà |