Template:Fgaddon commit: Difference between revisions
(Created page with "{{#if: {{{1|}}} <!-- Is the revision defined? --> | <!-- Yes, the revision is defined -->[http://sourceforge.net/p/flightgear/fgaddon/{{{1|}}} <!-- -->{{#if: {{{t|}}} <!-...") |
m (Switch from the temporary {{project infrastructure/code}} template to {{project infrastructure}} template with the mode set to 'abbrev'.) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{repo link | ||
| site = {{project infrastructure|abbrev}} | |||
| repo = fgaddon | |||
| type = svn web | |||
| commit = {{{1|HEAD}}} | |||
| view = commit | |||
| text = {{#if: {{{1|}}} | |||
| {{{text|{{{t|{{{2|FGAddon commit r{{strip whitespace|{{{1}}}}} }}} }}} }}} | |||
| {{error|Missing parameter '''commit'''|fgaddon commit}} | |||
}} | |||
}}<noinclude> | }}<noinclude> | ||
{{repo link/doc commit | |||
| label = FGAddon | |||
| repo = fgaddon | |||
| git = 0 | |||
| svn = 1 | |||
| type = svn | |||
| eg1commit = 1020 | |||
| eg2intro = Maintenance such as | |||
| eg2commit = 1001 | |||
| eg2text = removing Windows Thumbs.db files | |||
| eg2post = should not be needed | |||
}} | }} | ||
</noinclude> | </noinclude> |
Latest revision as of 16:20, 20 June 2019
{{fgaddon commit}}: Missing parameter commit
Goal
This template can be used when linking to summaries of commits for the FGAddon svn repository at SourceForge. It is a subtemplate of the master {{repo link}} template designed to link to specific version control commits.
Usage
{{fgaddon commit | commit | text = }}
The parameters are:
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
commit | The commit identifier (svn revision number). This defaults to HEAD. | 1 | mandatory | |
text | Text to display as the link label. | t | 2 | optional |
Design
In this section, the following notation will be used:
- Angular brackets + lower case text
<xyz>
- Template parameters.
- Angular brackets + upper case text
<XYZ>
- Template constructed text.
- Square brackets
[xyz]
- Optional text, only added if the parameter is set.
- Or symbol
|
- The value on the left, if present, otherwise the value on the right of the symbol.
Overview
The general design is:
<cmd> <opt> [<URL> <TEXT>] <post>
Here the square brackets do not denote optional text, but will instead produce a Mediawiki link. This can be modified by setting full = 1 to produce:
<cmd> <opt> <URL> <post>
Site: SourceForge
Project page
For a normal SourceForge project page, the base URL is respectively constructed as:
https://sourceforge.net/p/flightgear/fgaddon/
SourceForge svn <URL>
For the svn repository type, the <URL>
value will be:
https://sourceforge.net/p/flightgear/fgaddon/<commit|HEAD>
Plain text
To create a URL or link as plain text and avoid external links, simply use the {{#tag:tagname|content}}
magic word construct:
{{#tag:nowiki| {{repo link | full = 1 }} }}
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/
To use the <code> tags:
{{#tag:code|{{#tag:nowiki| {{repo link | full = 1 }} }}}}
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/
Examples
Auto-generated text
{{fgaddon commit | 1020}}
User supplied text
Maintenance such as {{fgaddon commit | 1001 | text = removing Windows Thumbs.db files}} should not be needed.
Maintenance such as removing Windows Thumbs.db files should not be needed.
Parameter alias
Maintenance such as {{fgaddon commit | 1001 | t = removing Windows Thumbs.db files}} should not be needed.
Maintenance such as removing Windows Thumbs.db files should not be needed.
Numbered parameters
Maintenance such as {{fgaddon commit | 1001 | removing Windows Thumbs.db files}} should not be needed.
Maintenance such as removing Windows Thumbs.db files should not be needed.
Related templates
|