Changes between Version 1 and Version 2 of WikiRestructuredTextLinks
- Timestamp:
- 04/09/08 13:31:39 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiRestructuredTextLinks
v1 v2 1 1 = TracLinks in reStructuredText = 2 2 3 This document i s for testing the ``..trac::`` directive.The page is written like3 This document illustrates how to use the ``..trac::`` directive in reStructureThe page is written like 4 4 5 5 {{{ … … 7 7 #!rst 8 8 9 Examples 10 ... 11 ... 9 Examples: 10 * Tickets: :trac:`#1` or :trac:`ticket:1` 11 * Ticket comments: :trac:`comment:ticket:1:2` 12 * Reports: :trac:`{1}` or :trac:`report:1` 13 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1` 14 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3` 15 * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539` 16 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase` 17 * Milestones: :trac:`milestone:1.0` 18 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff` 19 * Files: :trac:`source:trunk/COPYING` 20 * A specific file revision: :trac:`source:/trunk/COPYING@200` 21 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25` 12 22 13 23 }}} 14 24 }}} 15 25 26 Provided you have docutils installed, the above block will render as: 27 ---- 28 {{{ 29 #!rst 16 30 17 This is a list of example uses of the ''trac'' directive, providing use of TracLinks in WikiRestructuredText. 31 Examples: 32 * Tickets: :trac:`#1` or :trac:`ticket:1` 33 * Ticket comments: :trac:`comment:ticket:1:2` 34 * Reports: :trac:`{1}` or :trac:`report:1` 35 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1` 36 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3` 37 * Diffs (since version 0.10): :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539` 38 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase` 39 * Milestones: :trac:`milestone:1.0` 40 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff` 41 * Files: :trac:`source:trunk/COPYING` 42 * A specific file revision: :trac:`source:/trunk/COPYING@200` 43 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25` 44 45 }}} 46 ---- 47 48 Note also that any of the above could have been written using the alternate syntax for roles: 49 {{{ 50 {{{ 51 #!rst 52 53 See _`ticket:123` 54 55 .. trac:: ticket:123 Ticket 123 56 }}} 57 }}} 58 ---- 18 59 19 60 {{{ 20 61 #!rst 21 62 22 Examples 23 -------- 63 See _`ticket:123` 24 64 25 trac role 26 ========= 27 Syntax is \`link\`\:trac: or :trac:\`link\`, and could be put anywhere in the text. 'link' has the same format as explain for the ``.. trac::`` directive below. 28 29 ``In the middle of my text `WikiFormatting`:trac: see!!!!`` 30 In the middle of my text `WikiFormatting`:trac: see!!!! 31 32 or 33 34 ``In the middle of my text :trac:`WikiFormatting` see!!!!`` 35 In the middle of my text :trac:`WikiFormatting` see!!!! 36 37 38 wiki 39 ==== 40 ``.. trac:: WikiFormatting`` 41 .. trac:: WikiFormatting 42 43 ``.. trac:: wiki:WikiFormatting`` 44 .. trac:: wiki:WikiFormatting 45 46 ``.. trac:: wiki:WikiFormatting WikiFormatting`` 47 .. trac:: wiki:WikiFormatting WikiFormatting 48 49 ``.. trac:: wiki:WikiFormatting LinkText`` 50 .. trac:: wiki:WikiFormatting LinkText 51 52 tickets 53 ======= 54 55 ``.. trac:: #1`` 56 .. trac:: #1 57 ``.. trac:: #1 ticket one`` 58 .. trac:: #1 ticket one 59 ``.. trac:: ticket:1`` 60 .. trac:: ticket:1 61 ``.. trac:: ticket:1 ticket one`` 62 .. trac:: ticket:1 ticket one 63 64 reports 65 ======= 66 67 ``.. trac:: {1}`` 68 .. trac:: {1} 69 ``.. trac:: {1} report one`` 70 .. trac:: {1} report one 71 ``.. trac:: report:1`` 72 .. trac:: report:1 73 ``.. trac:: report:1 report one`` 74 .. trac:: report:1 report one 75 76 changesets 77 ========== 78 79 ``.. trac:: [42]`` 80 .. trac:: [42] 81 ``.. trac:: [42] changeset 42`` 82 .. trac:: [42] changeset 42 83 ``.. trac:: changeset:42`` 84 .. trac:: changeset:42 85 ``.. trac:: changeset:42 changeset 42`` 86 .. trac:: changeset:42 changeset 42 87 ``.. trac:: foo`` 88 .. trac:: foo 89 90 files 91 ===== 92 93 ``.. trac:: browser:/trunk/trac`` 94 .. trac:: browser:/trunk/trac 95 96 The leading ``/`` can be omitted... 97 98 ``.. trac:: repos:trunk/trac trunk/trac`` 99 .. trac:: repos:trunk/trac trunk/trac 100 ``.. trac:: source:trunk/trac Trac source code`` 101 .. trac:: source:trunk/trac Trac source code 102 103 ``.. trac:: browser:trunk/README`` 104 .. trac:: browser:trunk/README 105 ``.. trac:: repos:trunk/README trunk/README`` 106 .. trac:: repos:trunk/README trunk/README 107 ``.. trac:: source:trunk/README README in trunk`` 108 .. trac:: source:trunk/README README in trunk 109 110 Note that if ``hoo`` is a file, the link targets its revision log. In order to see the file's content, you need to specify the revision explicitely, like here: 111 112 ``.. trac:: browser:/trunk/README#latest latest of trunk/README`` 113 .. trac:: browser:/trunk/README#latest latest of trunk/README 114 ``.. trac:: repos:trunk/README#42 trunk/README in rev 42`` 115 .. trac:: repos:trunk/README#42 trunk/README in rev 42 65 .. trac:: ticket:123 Ticket 123 116 66 }}} 67 ---- 68 The above form has the additional benefit of allowing you to specify an explicit label for the link. 117 69 118 70 ---- 119 See also: WikiRestructuredText Links, TracLinks71 See also: WikiRestructuredText, TracLinks