Changes between Version 7 and Version 8 of TracLinks


Ignore:
Timestamp:
Sep 26, 2020, 12:33:45 AM (4 years ago)
Author:
JDLH (Jim DeLaHunt)
Comment:

Describe GitHub commit links including abbreviation in link text. New section "Links to MacPorts on GitHub"

Legend:

Unmodified
Added
Removed
Modified
  • TracLinks

    v7 v8  
    2929 Milestones :: `milestone:1.0`
    3030 Attachment :: `attachment:example.tgz` (for current page attachment), `attachment:attachment.1073.diff:ticket:944` (absolute path)
    31  Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`, `[1/repository]`
     31 Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`, `[1/repository]`,  `[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680]` (GitHub commit with abbreviation)
    3232 Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk@1:3`, `[2:5/trunk]`
    3333 Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin@9128:9953`,
     
    4444 Milestones :: milestone:1.0
    4545 Attachment :: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944 (absolute path)
    46  Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk, [1/repository]
     46 Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk, [1/repository],  [changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680] (GitHub commit with abbreviation)
     47
    4748 Revision log :: r1:3, [1:3] or log:@1:3, log:trunk@1:3, [2:5/trunk]
    4849 Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin@9128:9953,
     
    196197A distinctive advantage of InterTrac links over InterWiki links is that the shorthand form of Trac links (e.g. `{}`, `r`, `#`) can also be used. For example if T was set as an alias for Trac, links to Trac tickets can be written #T234, links to Trac changesets can be written [trac 1508].
    197198See InterTrac for the complete details.
     199
     200=== Links to MacPorts on GitHub
     201
     202This MacPorts instance of Trac is set up to interpret a certain changeset syntax as linking to MacPorts repositories on GitHub. We prefer the changeset syntax instead of a plain URL link when referring to commits on MacPorts repositories there.
     203
     204The syntax is: `[changeset:`''<full commit SHA>''`/`''<repository name''> [''optional link text''] `]`
     205
     206The MacPorts repository names on GitHub are listed at https://github.com/macports/ . The most useful repositories are `macports-ports` (the code of the ports), `macports-base` (the source code of the command-line client), and `macports-guide` (the source which compiles to the MacPorts Guide).
     207
     208The full commit SHA is a 40-digit hexadecimal number, generated by GitHub's git version control system.
     209
     210For example, in a commit with a URL like:
     211`https://github.com/macports/macports-ports/commit/bd5d6800828a3dcda1b65f3999fa748a365b168e`, the repository name is `macports-ports`, and the full commit SHA is `bd5d6800828a3dcda1b65f3999fa748a365b168e`.
     212
     213The preferred link to such a commit, in a Trac ticket or wiki page, is `[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680]`.
     214This displays as
     215[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680].
     216The link text, "commit bd5d680", uses the common practice of abbreviating git SHAs to 7 digits. Other link text may work better in your situation.
     217
     218Without the link text, the link is `[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports]`. It displays as [changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports] . This is valid, but verbose. Provide link text, and be more concise.
    198219
    199220=== Server-relative links