Difference between revisions of "Template:Gitcommit"

From MythTV Official Wiki
Jump to: navigation, search
(put back the default to the mythtv repository as it appears to be a bit faster in lookup)
m (default to https for code.mythtv.org)
Line 1: Line 1:
<includeonly><span name="gitchangeset">[http://code.mythtv.org/trac/changeset/{{{1}}}/{{{2|mythtv}}} &#91;{{{3|{{{1}}}}}}&#93;]</span></includeonly><noinclude>
+
<includeonly><span name="gitchangeset">[https://code.mythtv.org/trac/changeset/{{{1}}}/{{{2|mythtv}}} &#91;{{{3|{{{1}}}}}}&#93;]</span></includeonly><noinclude>
 
This template is used to provide a link to MythTV's Trac server by change set.  This template defaults to allowing Trac select the repository, but can be forced to use any under the '''MythTV''' project.
 
This template is used to provide a link to MythTV's Trac server by change set.  This template defaults to allowing Trac select the repository, but can be forced to use any under the '''MythTV''' project.
  
Line 7: Line 7:
 
*** Where 1 equals the git SHA-1 tag, with at least 7 of the first characters (preferred).
 
*** Where 1 equals the git SHA-1 tag, with at least 7 of the first characters (preferred).
 
*** Example:  
 
*** Example:  
**** <nowiki>{{gitcommit|0a3fc07}} will go to http://code.mythtv.org/trac/changeset/0a3fc07</nowiki>
+
**** <nowiki>{{gitcommit|0a3fc07}} will go to https://code.mythtv.org/trac/changeset/0a3fc07</nowiki>
 
**** It will display as - {{gitcommit|0a3fc07}}
 
**** It will display as - {{gitcommit|0a3fc07}}
  
Line 20: Line 20:
 
**** mythtv (default)
 
**** mythtv (default)
 
*** Example:  
 
*** Example:  
**** <nowiki>{{gitcommit|4753643|mythweb}} will go to http://code.mythtv.org/trac/changeset/4753643/mythweb</nowiki>
+
**** <nowiki>{{gitcommit|4753643|mythweb}} will go to https://code.mythtv.org/trac/changeset/4753643/mythweb</nowiki>
 
**** It will display as - {{gitcommit|4753643|mythweb}}
 
**** It will display as - {{gitcommit|4753643|mythweb}}
  
Line 34: Line 34:
 
*** 3 = optional display instead of hash (i.e., git describe output such as "v0.17-2759-g7f3dcda")
 
*** 3 = optional display instead of hash (i.e., git describe output such as "v0.17-2759-g7f3dcda")
 
*** Example:  
 
*** Example:  
**** <nowiki>{{gitcommit|7f3dcdab|mythtv|v0.17-2759-g7f3dcda}} will go to https://github.com/MythTV/mythtv/commit/7f3dcdab</nowiki>
+
**** <nowiki>{{gitcommit|7f3dcdab|mythtv|v0.17-2759-g7f3dcda}} will go to https://code.mythtv.org/trac/changeset/7f3dcdab/mythtv</nowiki>
 
**** It will display as - {{gitcommit|7f3dcdab|mythtv|v0.17-2759-g7f3dcda}}
 
**** It will display as - {{gitcommit|7f3dcdab|mythtv|v0.17-2759-g7f3dcda}}
  
 
The revision hashes can be shortened by truncating them, but they must be at least long enough to ensure a unique key (currently recommended at 7 digits).
 
The revision hashes can be shortened by truncating them, but they must be at least long enough to ensure a unique key (currently recommended at 7 digits).
 
</noinclude>
 
</noinclude>

Revision as of 22:26, 2 February 2014

This template is used to provide a link to MythTV's Trac server by change set. This template defaults to allowing Trac select the repository, but can be forced to use any under the MythTV project.

Usage:

  • For commits in the MythTV repository (and all branches within)
    • {{gitcommit|1}}
      • Where 1 equals the git SHA-1 tag, with at least 7 of the first characters (preferred).
      • Example:
        • {{gitcommit|0a3fc07}} will go to https://code.mythtv.org/trac/changeset/0a3fc07
        • It will display as - [0a3fc07]cgitgithub
  • For commits to other MythTV repositories (and all branches within)
    • {{gitcommit|1|2}}
      • 1 = the git SHA-1 tag, with at least 7 of the first characters (preferred).
      • 2 = a MythTV repository, current options are:
        • extras
        • packaging
        • mythweb
        • nuvexport
        • mythtv (default)
      • Example:
        • {{gitcommit|4753643|mythweb}} will go to https://code.mythtv.org/trac/changeset/4753643/mythweb
        • It will display as - [4753643]cgitgithub
  • To add an optional display instead of the GIT hash, you can use an optional third parameter. However, you must explicitly use the second parameter in this case and classify the repository.
    • {{gitcommit|1|2|3}}
      • 1 = the git SHA-1 tag, with at least 7 of the first characters (preferred).
      • 2 = a MythTV repository, current options are:
        • mythtv
        • extras
        • packaging
        • mythweb
        • nuvexport
      • 3 = optional display instead of hash (i.e., git describe output such as "v0.17-2759-g7f3dcda")
      • Example:
        • {{gitcommit|7f3dcdab|mythtv|v0.17-2759-g7f3dcda}} will go to https://code.mythtv.org/trac/changeset/7f3dcdab/mythtv
        • It will display as - [v0.17-2759-g7f3dcda]cgitgithub

The revision hashes can be shortened by truncating them, but they must be at least long enough to ensure a unique key (currently recommended at 7 digits).