[MacPorts] TracLinks modified

MacPorts Wiki noreply at macports.org
Sat Sep 26 00:33:46 UTC 2020


Page "TracLinks" was changed by JDLH
Diff URL: <https://trac.macports.org/wiki/TracLinks?action=diff&version=8>
Revision 8
Comment: Describe GitHub commit links including abbreviation in link text. New section "Links to MacPorts on GitHub"
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: TracLinks
=========================================================================
--- TracLinks (version: 7)
+++ TracLinks (version: 8)
@@ -28,7 +28,7 @@
  Reports :: `{1}` or `report:1`
  Milestones :: `milestone:1.0`
  Attachment :: `attachment:example.tgz` (for current page attachment), `attachment:attachment.1073.diff:ticket:944` (absolute path)
- Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`, `[1/repository]`
+ Changesets :: `r1`, `[1]`, `changeset:1` or (restricted) `[1/trunk]`, `changeset:1/trunk`, `[1/repository]`,  `[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680]` (GitHub commit with abbreviation)
  Revision log :: `r1:3`, `[1:3]` or `log:@1:3`, `log:trunk at 1:3`, `[2:5/trunk]`
  Diffs :: `diff:@1:3`, `diff:plugins/0.12/mercurial-plugin at 9128:9953`,
           `diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` 
@@ -43,7 +43,8 @@
  Reports :: {1} or report:1
  Milestones :: milestone:1.0
  Attachment :: attachment:example.tgz (for current page attachment), attachment:attachment.1073.diff:ticket:944 (absolute path)
- Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk, [1/repository]
+ Changesets :: r1, [1], changeset:1 or (restricted) [1/trunk], changeset:1/trunk, [1/repository],  [changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680] (GitHub commit with abbreviation)
+
  Revision log :: r1:3, [1:3] or log:@1:3, log:trunk at 1:3, [2:5/trunk]
  Diffs :: diff:@1:3, diff:plugins/0.12/mercurial-plugin at 9128:9953,
           diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default 
@@ -195,6 +196,26 @@
 
 A 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].
 See InterTrac for the complete details. 
+
+=== Links to MacPorts on GitHub
+
+This 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.
+
+The syntax is: `[changeset:`''<full commit SHA>''`/`''<repository name''> [''optional link text''] `]`
+
+The 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).
+
+The full commit SHA is a 40-digit hexadecimal number, generated by GitHub's git version control system.
+
+For example, in a commit with a URL like: 
+`https://github.com/macports/macports-ports/commit/bd5d6800828a3dcda1b65f3999fa748a365b168e`, the repository name is `macports-ports`, and the full commit SHA is `bd5d6800828a3dcda1b65f3999fa748a365b168e`. 
+
+The preferred link to such a commit, in a Trac ticket or wiki page, is `[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680]`. 
+This displays as 
+[changeset:bd5d6800828a3dcda1b65f3999fa748a365b168e/macports-ports commit bd5d680]. 
+The link text, "commit bd5d680", uses the common practice of abbreviating git SHAs to 7 digits. Other link text may work better in your situation.
+
+Without 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.
 
 === Server-relative links
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/TracLinks>
MacPorts <https://www.macports.org/>
Ports system for macOS

This is an automated message. Someone added your email address to be
notified of changes on 'TracLinks' page.
If it was not you, please report to admin at macports.org.


More information about the macports-changes mailing list