Template:Repo link
Caution This template, via its subtemplates, is used by many pages. Therefore modifications will propagate throughout the relax wiki and have a large effect. Changes should be carefully tested on a /sandbox subpage or as a user subpage before being implemented here. |
Template documentation
Contents
- 1 Goal
- 2 Usage
- 3 Design
- 3.1 Overview
- 3.2 Site: SourceForge
- 3.2.1 Project vs. developer page
- 3.2.2 SourceForge <URL> for 'type=git'
- 3.2.3 SourceForge <URL> for 'type=git web'
- 3.2.4 SourceForge <URL> for 'type=svn'
- 3.2.5 SourceForge <URL> for 'type=svn web'
- 3.2.6 SourceForge URL <TEXT> for 'type=git' and 'type=git web'
- 3.2.7 SourceForge URL <TEXT> for 'type=svn' and 'type=svn web'
- 3.3 Site: GitHub
- 3.4 Site: GitLab
- 3.5 Site: Gitorious
- 3.6 Site: Generic
- 4 Plain text
- 5 Examples
- 5.1 SourceForge examples
- 5.1.1 FlightGear repository
- 5.1.2 SimGear repository
- 5.1.3 FGData repository links
- 5.1.4 FGMeta repository
- 5.1.5 FGAddon repository links
- 5.1.5.1 Branch
- 5.1.5.2 Tag
- 5.1.5.3 r1001
- 5.1.5.4 r1001, default view
- 5.1.5.5 Trunk (r1000)
- 5.1.5.6 Trunk, real path
- 5.1.5.7 Svn checkout
- 5.1.5.8 Svn trunk checkout
- 5.1.5.9 Svn checkout (trunk@r1000)
- 5.1.5.10 File and line number link
- 5.1.5.11 File prefixed with $FG_AIRCRAFT
- 5.1.5.12 File prefixed with $FG_AIRCRAFT and identified by commit
- 5.1.5.13 svn import
- 5.1.5.14 FGAddon RSS feed
- 5.1.6 User fork of the FlightGear repository
- 5.1.7 Zip archive download
- 5.2 GitHub examples
- 5.3 GitLab examples
- 5.3.1 Base site URL
- 5.3.2 User repository
- 5.3.3 The FlightGear Multiplayer server software
- 5.3.4 File
- 5.3.5 File and a branch
- 5.3.6 File and a commit
- 5.3.7 File with line number
- 5.3.8 Raw view
- 5.3.9 Commit
- 5.3.10 Tree view at a given commit
- 5.3.11 Main views
- 5.3.12 Zip archive download
- 5.3.13 Zip archive download with tag
- 5.4 Gitorious archive examples
- 5.4.1 Base site URL
- 5.4.2 The old FlightGear source repository
- 5.4.3 The historic fgdata repository
- 5.4.4 File and branch in the historic fgdata repository
- 5.4.5 File and tag in the historic fgdata repository
- 5.4.6 Git clone
- 5.4.7 File with line number
- 5.4.8 File prefixed with $NASAL_SRC
- 5.4.9 Branch
- 5.4.10 Commit
- 5.4.11 Commit with file path
- 5.4.12 Commitdiff
- 5.4.13 Main views
- 5.4.14 Merge requests
- 5.5 Generic repository handling
- 5.1 SourceForge examples
- 6 Related templates
Goal
This is designed to be a master template for creating links or URLs for all types of online version control repository. This includes for SourceForge, GitHub, GitLab, the Gitorious archive, and basic support for generic online repositories. The detailed documentation below, as well as the examples, will help to understand the full family of subtemplates that are based on the master {{repo link}} template.
Although it can be used directly for full flexibility, this is not recommended. Rather the large family of subtemplates that are interfaces to this master template should be used. This allows for better long-term management of the wiki (for example, by using the Special:WhatLinksHere page to find all usages of the subtemplates).
Note This template may add an external link. You may therefore have to answer an anti-spam security question before your edit is saved.
Usage
{{repo link | site = | cmd = | opt = | protocol = | login = | type = | user = | proj = | repo = | branch = | tag = | commit = | path = | line = | post = | view = | text = | pre = | simplepath = | full = }}
All parameters except site are optional.
Parameter | Description | Abbreviated parameter |
Numbered parameter |
Status |
---|---|---|---|---|
site | Points the template to a repository host:
|
mandatory | ||
cmd | An optional command line tool name + options to prepend to the URL. For example git clone. | optional | ||
opt | Any additional options to show after cmd, but before the URL.
|
optional | ||
protocol | The URL protocol, for example https, http, ssh, git, svn. This defaults to https. | optional | ||
login | The optional user login. This should not to be confused with the user parameter. | optional | ||
type | Choose between the web interface, a direct repository link, or a zip file download. This can be one of git, git web, svn, svn web, zip. See the {{* zip file}} templates for a simplified interface for the zip files. The default is git web.
|
optional | ||
user | The name of the user page for the open source infrastructure. This is notably different to the login parameter. This will have precedence over the proj parameter. The user page is treated in the same way as a project name. | optional | ||
proj | The name of the project, consisting of a grouping of repositories on the open source infrastructure. | optional | ||
repo | The name of the repository. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. | optional | ||
branch | The branch name. As tags are simply branches in SVN repositories, this parameter can also be used for svn tags. This defaults to next or trunk for git and svn respectively. For SourceForge git repositories, if the character / is present in the branch name, the text /~ must be appended to the branch.
|
optional | ||
tag | The repository tag name. For SourceForge git repositories, if the character / is present in the tag name, the text /~ must be appended to the tag.
|
optional | ||
commit | The commit identifier (git hash or svn revision number). This defaults to HEAD. | optional | ||
path | The file or directory path. | optional | ||
line | The line number(s) of the file to display.
|
optional | ||
post | Text to append. This is forms a set with the parameter cmd and opt. For example it can represent any command line options that come after the URL. | optional | ||
view | View to display:
|
optional | ||
text | Text to display as the link label. Overrides pre. | optional | ||
pre | Prefix to a link label. | optional | ||
simplepath | If set, this strips off the repository name from the URL label, leaving just the contents of the path parameter.
|
optional | ||
full | If set to 1, the full URL will be shown rather than any text label. | 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
Independent of the site parameter, 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>
The URL is constructed differently for each of the categories of the site parameter.
Site: SourceForge
Project vs. developer page
For a normal SourceForge project and a SourceForge developer page, the base URL is respectively constructed as:
<protocol>://<DOMAIN>/p/<proj>/<repo>/ <protocol>://<DOMAIN>/u/<user>/<repo>/
This will be abstracted as:
<protocol>://<DOMAIN>/<u|p>/<user|proj>/<repo>/
For the type parameter value of git or svn, a login is allowed:
<protocol>://[<login>@]<DOMAIN>/<u|p>/<user|proj>/<repo>/
SourceForge <URL> for 'type=git'
For this parameter value, the complete <URL>
value will be:
<protocol>://[<login>@]git.code.sf.net/<u|p>/<user|proj>/<repo>/
SourceForge <URL> for 'type=git web'
For this parameter value, the <URL>
value will be:
<protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/ci/<commit|branch>/<VIEW>/<path>[#l<line>]
The <VIEW>
value for different values of view is:
- tree
tree/
.- log
log/?path=
.- commit
- nothing.
If the parameter setting view=rss is used, a different <URL>
value is produced:
<protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/feed/
SourceForge <URL> for 'type=svn'
For this parameter value, the <URL>
value will instead be:
<protocol>://[<login>@]svn.code.sf.net/<u|p>/<user|proj>/<repo>/<branch>[/<path>][@<commit>]
SourceForge <URL> for 'type=svn web'
For this parameter value, the <URL>
value will be:
<protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/<commit|HEAD>/<VIEW>/<branch>[/<path>][#l<line>]
The <VIEW>
value for different values of view is:
- tree
tree/
.- log
log/?path=
.
If the parameter setting view=commit is used, a truncated <URL> value is produced:
<protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/<commit|HEAD>/
If the parameter setting view=rss is used, a different <URL> value is produced:
<protocol>://sourceforge.net/<u|p>/<user|proj>/<repo>/feed/
SourceForge URL <TEXT> for 'type=git' and 'type=git web'
The link text <TEXT>
, if the full parameter is not set, will be:
<user|proj>/<repo>/<commit|branch>[/<path>][#l<line>] <DESC>
If the simplepath parameter is set, this changes to:
[/<path>][#l<line>] <DESC>
If the pre parameter is supplied, this changes to:
<pre>[/<path>][#l<line>] <DESC>
The RSS feed is a special case in that <TEXT>
will be one of:
<user|proj>/<repo> <DESC>
<pre> <DESC>
The description <DESC>
is dependent on the view parameter:
- tree
- Nothing.
- log
log view
.- commit
commit view
.- rss
RSS feed
.
The text parameter trumps all, and <TEXT>
is simply:
<text>
SourceForge URL <TEXT> for 'type=svn' and 'type=svn web'
The link text <TEXT>
, if the full parameter is not set, will be:
<user|proj>/<repo>/<branch>[/<path>][#l<line>][@r<commit>] <DESC>
If the simplepath parameter is set, this changes to:
[/<path>][#l<line>][@r<commit>] <DESC>
If the pre parameter is supplied, this changes to:
<pre>[/<path>][#l<line>][@r<commit>] <DESC>
The RSS feed is a special case in that <TEXT>
will be one of:
<user|proj>/<repo> <DESC>
<pre> <DESC>
The description <DESC>
is dependent on the view parameter:
- tree
- Nothing.
- log
log view
.- commit
commit view
.- rss
RSS feed
.
The text parameter trumps all, and <TEXT>
is simply:
<text>
Site: GitHub
The base URL for GitHub repositories is:
<protocol>://github.com/<user|proj>/<repo>
GitHub <URL> for 'type=git'
For this parameter value, the complete <URL>
value will be:
<protocol>://github.com/<user|proj>/<repo>.git
GitHub <URL> for 'type=git web'
For this parameter value, the <URL>
value will be:
<protocol>://github.com/<user|proj>/<repo>/<view>/<commit|branch>[/<path>][#L<line>]
GitHub <URL> for 'type=zip'
For this parameter value, the zip file URL will be:
<protocol>://github.com/<proj>/<repo>/archive/<commit|tag|branch>.zip
If neither a commit, branch, nor tag is specified, the URL will default to:
<protocol>://github.com/<proj>/<repo>/archive/master.zip
GitHub URL <TEXT> for 'type=git' and 'type=git web'
The link text <TEXT>
, if the full parameter is not set, will be:
github/<user|proj>/<repo>/<commit|branch|HEAD>[/<path>][#L<line>]
If the simplepath parameter is set, this changes to:
[/<path>][#L<line>]
If the pre parameter is supplied, this changes to:
<pre>[/<path>][#L<line>]
The text parameter trumps all, and <TEXT>
is simply:
<text>
GitHub URL <TEXT> for 'type=zip'
The link text <TEXT>
, if the full parameter is not set, will be:
github/<user|proj>/<repo>/[<commit|tag|branch>] zip file
If the simplepath parameter is set, this changes to:
zip file
If the pre parameter is supplied, this changes to:
<pre> zip file
The text parameter trumps all, and <TEXT>
is simply:
<text>
Site: GitLab
The base URL for GitLab repositories is:
<protocol>://gitlab.com/<proj>[/<repo>]
GitLab <URL> for 'type=git'
For this parameter value, the complete <URL>
value will be:
<protocol>://gitlab.com/<proj>[/<repo>].git
GitLab <URL> for 'type=git web'
This is not implemented yet. Please add new examples to allow this template to be extended.
GitLab <URL> for 'type=zip'
For this parameter value, the base zip file URL will be:
<protocol>://gitlab.com/<proj>/<repo>/repository/archive.zip
If a branch, tag, or commit is specified, this will be added as a query:
<protocol>://gitlab.com/<proj>/<repo>/repository/archive.zip[?ref=<commit|tag|branch>]
GitLab URL <TEXT>
This is not implemented yet. Please add new examples to allow this template to be extended.
Site: Gitorious
The Gitorious URLs are predominantly query rather than path based. And only the https://
protocol is supported. The base URL constructed by this template is:
<protocol>://gitorious.org/<proj>/<repo>
Gitorious <URL> for 'type=git'
For this parameter value, the complete <URL>
value will be:
<protocol>://gitorious.org/<proj>/<repo>.git
Gitorious <URL> for 'type=git web'
As the current archival system is based on queries — the text after the ?
character — absolutely any random path after the gitorious.org/
domain name can be used. But, for aesthetics, the project and repository name will be appended by this template. The <URL>
will be:
<protocol>://gitorious.org/<proj>/<repo>?<QUERY>[#l<line>]
The <QUERY>
string consists of parts for the project and repository (p=
), the type of view (a=
), the path (f=
), and the commit, branch or tag (h=
or hb=
, depending on the view).
The <URL>
fragment for the project and repository is constructed as:
<protocol>://gitorious.org/<proj>/<repo>?p=<proj>:<repo>.git
The <URL>
fragment for the view is constructed as:
<protocol>://gitorious.org/<proj>/<repo>?a=<VIEW>
Where <VIEW>
is the value of the view parameter, if supplied, with the value of raw translated to blob_plain
. If not supplied, the value of blob
is used if path is given, commit
if commit is given, or summary
otherwise.
The <URL>
fragment for the path is constructed as:
<protocol>://gitorious.org/<proj>/<repo>?f=<path>
If the view parameter is set to one of blob, raw, or tree, the <URL>
fragment for the commit, branch or tag is constructed as:
<protocol>://gitorious.org/<proj>/<repo>[?hb=refs/merge-requests/<mr>|<commit>|refs/heads/<branch>]
Otherwise it will be:
<protocol>://gitorious.org/<proj>/<repo>[?h=refs/merge-requests/<mr>|<commit>|refs/heads/<branch>]
In summary, the full web URL will be:
<protocol>://gitorious.org/<proj>/<repo>?p=<proj>:<repo>.git;a=<VIEW>[;f=<path>][;<h|hb>=refs/merge-requests/<mr>|<commit>|refs/heads/<branch>][#l<line>]
Gitorious URL <TEXT>
The link text <TEXT>
, if the full parameter is not set, will be:
<proj>/<repo>/<commit|branch|HEAD>[/<path>][#l<line>]
If the simplepath parameter is set, this changes to:
[/<path>][#l<line>]
If the pre parameter is supplied, this changes to:
<pre>[/<path>][#l<line>]
The text parameter trumps all, and <TEXT>
is simply:
<text>
Site: Generic
If the site parameter does not match one of the know open source infrastructures, then an attempt will be made to create a generic repository link. The base URL for generic repositories is:
<protocol>://[<login>@]<site>/<user|proj>[/<repo>]
Generic repository <URL> for 'type=git'
For this parameter value, the complete <URL>
value will be the base URL.
Generic repository <URL> for 'type=git web'
This is not implemented yet. Please add new examples to allow this template to be extended.
Generic repository <URL> for 'type=svn'
For this parameter value, the complete <URL>
value will be:
<protocol>://[<login>@]<site>/<user|proj>[/<repo>]/<branch>
The value of branch defaults to trunk
.
Generic repository <URL> for 'type=svn web'
This is not implemented yet. Please add new examples to allow this template to be extended.
Generic repository URL <TEXT>
This is not implemented yet. Please add new examples to allow this template to be extended.
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/nmr-relax/code/ci/master/tree/
To use the <code> tags:
{{#tag:code|{{#tag:nowiki| {{repo link | full = 1 }} }}}}
https://sourceforge.net/p/nmr-relax/code/ci/master/tree/
Examples
SourceForge examples
FlightGear repository
The source repository
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/.
{{repo link | site = sf | proj = flightgear | repo = flightgear | text = The flightgear source repository }}.
The flightgear source repository.
Git clone
This is for git clone git://git.code.sf.net/p/flightgear/flightgear flightgear-flightgear
.
{{#tag:code|{{#tag:nowiki|{{repo link | site = sf | cmd = git clone | protocol = git | repo = flightgear | type = git | post = flightgear-flightgear | full = 1 }}}}}}.
git clone git://git.code.sf.net/p/nmr-relax/flightgear/ flightgear-flightgear
.
File with line number
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/Main/fg_init.cxx#l1.
{{repo link | site = sf | repo = flightgear | path = src/Main/fg_init.cxx | line = 1 }}.
nmr-relax/flightgear/master/src/Main/fg_init.cxx#l1.
File prefixed with $FLIGHTGEAR_SRC
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/Main/fg_init.cxx. The expected link text is "$FLIGHTGEAR_SRC/src/Main/fg_init.cxx".
{{repo link | site = sf | repo = flightgear | path = src/Main/fg_init.cxx | pre = $FLIGHTGEAR_SRC }}.
$FLIGHTGEAR_SRC/src/Main/fg_init.cxx.
Branch
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/sportmodel/tree/.
{{repo link | site = sf | repo = flightgear | branch = sportmodel }}.
nmr-relax/flightgear/sportmodel.
Tag
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/version/2016.1.1/~/tree/.
{{repo link | site = sf | repo = flightgear | tag = version/2016.1.1/~ }}.
nmr-relax/flightgear/version/2016.1.1/~.
Tag, history view
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/version/2016.1.1/~/log/?path=.
{{repo link | site = sf | repo = flightgear | tag = version/2016.1.1/~ | view = log }}.
nmr-relax/flightgear/version/2016.1.1/~ log view.
Commit
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/f88d6418297e250138fda48f5a7d3e51bb3c543d/
{{repo link | site = sf | repo = flightgear | commit = f88d6418297e250138fda48f5a7d3e51bb3c543d | view = commit }}.
nmr-relax/flightgear/f88d6418297e250138fda48f5a7d3e51bb3c543d commit view.
Or:
{{repo link | site = sf | repo = flightgear | commit = f88d6418297e250138fda48f5a7d3e51bb3c543d }}.
nmr-relax/flightgear/f88d6418297e250138fda48f5a7d3e51bb3c543d commit view.
Commit, history view
This is a link to https://sourceforge.net/p/flightgear/flightgear/ci/f88d6418297e250138fda48f5a7d3e51bb3c543d/log/?path=
{{repo link | site = sf | repo = flightgear | commit = f88d6418297e250138fda48f5a7d3e51bb3c543d | view = log }}.
nmr-relax/flightgear/f88d6418297e250138fda48f5a7d3e51bb3c543d log view.
Repository clone
This is for the command git clone git://git.code.sf.net/p/flightgear/flightgear/ flightgear-flightgear
{{#tag:code|{{#tag:nowiki|{{repo link | site = sf | cmd = git clone | protocol = git | type = git | repo = flightgear | post = flightgear-flightgear | full = 1 }}}}}}.
git clone git://git.code.sf.net/p/nmr-relax/flightgear/ flightgear-flightgear
.
Or as plain text:
{{#tag:nowiki|{{repo link | site = sf | cmd = git clone | protocol = git | type = git | repo = flightgear | post = flightgear-flightgear | full = 1 }}}}.
git clone git://git.code.sf.net/p/nmr-relax/flightgear/ flightgear-flightgear.
SimGear repository
Non-web URL
This is a link to ssh://git.code.sf.net/p/flightgear/simgear.
{{repo link | site = sf | protocol = ssh | type = git | repo = simgear | full = 1 }}.
ssh://git.code.sf.net/p/nmr-relax/simgear/.
Simgear RSS feed
This is a link to https://sourceforge.net/p/flightgear/simgear/feed.
{{repo link | site = sf | repo = simgear | view = rss | text = Simgear RSS feed }}.
Or without text:
{{repo link | site = sf | login = dummy_user <!-- Dummy parameter, not to be used --> | repo = simgear | view = rss | branch = branches/release-2016.1/~ <!-- Dummy parameter, not to be used --> | path = simgear/ <!-- Dummy parameter, not to be used --> | commit = f88d6418297e250138fda48f5a7d3e51bb3c543d <!-- Dummy parameter, not to be used --> | line = 10 <!-- Dummy parameter, not to be used --> }}.
FGData repository links
$FG_ROOT prefix and a commit
{{repo link | site = sf | type = git web | repo = fgdata | path = AI/nimitz_demo.xml | commit = 7b53516a9619f598721d7ee34d6a446367e9d9cd | line = 85 | pre = $FG_ROOT }}
$FG_ROOT/AI/nimitz_demo.xml#l85 (commit 7b53516a9619f598721d7ee34d6a446367e9d9cd)
FGMeta repository
Raw view
This is a link to https://sourceforge.net/p/flightgear/fgmeta/ci/next/tree/download_and_compile.sh?format=raw.
{{repo link | site = sf | repo = fgmeta | path = download_and_compile.sh | view = raw | full = 1 }}.
https://sourceforge.net/p/nmr-relax/fgmeta/ci/master/tree/download_and_compile.sh?format=raw.
FGAddon repository links
Branch
This is a link for https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/branches/release-3.4.0/Aircraft.
{{repo link | site = sf | type = svn web | repo = fgaddon | branch = branches/release-3.4.0 | path = Aircraft | text = FG 3.4 add-on aircraft }}.
Tag
This is a link for https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/branches/release-3.4.0/Aircraft. Although branches/relax-3.4.0
is a branch, this tests the tag parameter.
{{repo link | site = sf | type = svn web | repo = fgaddon | tag = branches/release-3.4.0 | path = Aircraft | full = 1 }}.
https://sourceforge.net/p/nmr-relax/fgaddon/HEAD/tree/branches/release-3.4.0/Aircraft.
r1001
This is a link for https://sourceforge.net/p/flightgear/fgaddon/1001.
{{repo link | site = sf | type = svn web | repo = fgaddon | commit = 1001 | view = commit }}.
nmr-relax/fgaddon@r1001 commit view.
r1001, default view
This is a link for https://sourceforge.net/p/flightgear/fgaddon/1001.
{{repo link | site = sf | type = svn web | repo = fgaddon | commit = 1001 }}.
nmr-relax/fgaddon@r1001 commit view.
Trunk (r1000)
This is a link for https://sourceforge.net/p/flightgear/fgaddon/1000/tree/trunk/Aircraft.
{{repo link | site = sf | type = svn web | repo = fgaddon | commit = 1000 | branch = trunk | path = Aircraft }}.
nmr-relax/fgaddon/trunk/Aircraft@r1000.
Trunk, real path
This is a link for https://svn.code.sf.net/p/flightgear/fgaddon/trunk.
{{repo link | site = sf | type = svn | repo = fgaddon | branch = trunk | full = 1 }}.
https://svn.code.sf.net/p/nmr-relax/fgaddon/trunk.
Svn checkout
This is for returning svn co https://svn.code.sf.net/p/flightgear/fgaddon/branches/release-3.4.0/Aircraft/V22-Osprey
{{#tag:code|{{#tag:nowiki|{{repo link | site = sf | cmd = svn co | type = svn | repo = fgaddon | branch = branches/release-3.4.0 | path = Aircraft/V22-Osprey | full = 1 }}.
svn co https://svn.code.sf.net/p/nmr-relax/fgaddon/branches/release-3.4.0/Aircraft/V22-Osprey
.
Svn trunk checkout
This is for returning svn co https://svn.code.sf.net/p/flightgear/fgaddon/trunk flightgear-fgaddon
{{#tag:code|{{#tag:nowiki|{{repo link | site = sf | cmd = svn co | type = svn | repo = fgaddon | post = flightgear-fgaddon | full = 1 }}.
svn co https://svn.code.sf.net/p/nmr-relax/fgaddon/trunk flightgear-fgaddon
.
Svn checkout (trunk@r1000)
This is for returning svn co https://svn.code.sf.net/p/flightgear/fgaddon/trunk@r1000
{{#tag:code|{{#tag:nowiki|{{repo link | site = sf | cmd = svn co | type = svn | repo = fgaddon | commit = 1000 | full = 1 }}}}}}.
svn co https://svn.code.sf.net/p/nmr-relax/fgaddon/trunk@r1000
.
File and line number link
This is for https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Aircraft/14bis/14bis-set.xml#l12.
{{repo link | site = sf | type = svn web | repo = fgaddon | path = Aircraft/14bis/14bis-set.xml | line = 12 | branch = trunk | simplepath = 1 }}.
Aircraft/14bis/14bis-set.xml#l12.
File prefixed with $FG_AIRCRAFT
This is for https://sourceforge.net/p/flightgear/fgaddon/1234/tree/trunk/Aircraft/X15/X15-set.xml. The expected link text is "$FG_AIRCRAFT/Aircraft/X15/X15-set.xml".
{{repo link | site = sf | type = svn web | repo = fgaddon | path = Aircraft/X15/X15-set.xml | pre = $FG_AIRCRAFT }}.
$FG_AIRCRAFT/Aircraft/X15/X15-set.xml.
File prefixed with $FG_AIRCRAFT and identified by commit
This is for https://sourceforge.net/p/flightgear/fgaddon/1234/tree/trunk/Aircraft/X15/X15-set.xml. The expected link text is "$FG_AIRCRAFT/Aircraft/X15/X15-set.xml@1234".
{{repo link | site = sf | type = svn web | repo = fgaddon | path = Aircraft/X15/X15-set.xml | commit = 1234 | pre = $FG_AIRCRAFT }}.
$FG_AIRCRAFT/Aircraft/X15/X15-set.xml@r1234.
svn import
This should give:
svn import DaSH/ svn+ssh://<username>@svn.code.sf.net/p/flightgear/fgaddon/trunk/Aircraft/ -m "Initial import of the DaSH human powered aircraft.\n\nFor details see the forum thread at http://forum.flightgear.org/viewtopic.php?f=4&t=24495 ."
{{#tag:syntaxhighlight| {{repo link | cmd = svn import DaSH/ | repo = fgaddon | protocol = svn+ssh | login = <username> | type = svn | path = Aircraft/ | post = -m "Initial import of the DaSH human powered aircraft.\n\nFor details see the forum thread at http://forum.flightgear.org/viewtopic.php?f=4&t=24495 ." | full = 1 }} | lang = "sh" }}
svn import DaSH/ svn+ssh://<username>@svn.code.sf.net/p/nmr-relax/fgaddon/trunk/Aircraft/ -m "Initial import of the DaSH human powered aircraft.\n\nFor details see the forum thread at http://forum.flightgear.org/viewtopic.php?f=4&t=24495 ."
FGAddon RSS feed
This is a link to https://sourceforge.net/p/flightgear/fgaddon/feed.
{{repo link | site = sf | login = dummy_user <!-- Dummy parameter, not to be used --> | repo = fgaddon | type = svn web | view = rss | branch = branches/release-2016.1 <!-- Dummy parameter, not to be used --> | path = Aircraft/ <!-- Dummy parameter, not to be used --> | commit = 1234 <!-- Dummy parameter, not to be used --> | line = 200 <!-- Dummy parameter, not to be used --> }}.
User fork of the FlightGear repository
This is for https://sourceforge.net/u/edauvergne/code-py-ogel/ci/python/tree/test.py#l23.
{{repo link | site = sf | repo = code-py-ogel | branch = python | path = test.py | line = 23 | user = edauvergne }}.
edauvergne/code-py-ogel/python/test.py#l23.
Zip archive download
Default
This is for https://sourceforge.net/p/nmr-relax/code/ci/master/tarball.
{{repo link | site = sf | proj = nmr-relax | repo = code | type = zip | full = 1 }}.
https://sourceforge.net/p/nmr-relax/code/ci/master/tarball.
Branch
This is for https://sourceforge.net/p/nmr-relax/code/ci/absolute_rdc/tarball.
{{repo link | site = sf | proj = nmr-relax | repo = code | branch = absolute_rdc | type = zip | full = 1 }}.
https://sourceforge.net/p/nmr-relax/code/ci/absolute_rdc/tarball.
Commit
This is for https://sourceforge.net/p/nmr-relax/code/ci/58d63f8dc7b5a17e97bc260c557b2d16a3782f8a/tarball.
{{repo link | site = sf | proj = nmr-relax | repo = code | commit = 58d63f8dc7b5a17e97bc260c557b2d16a3782f8a | type = zip | full = 1 }}.
https://sourceforge.net/p/nmr-relax/code/ci/58d63f8dc7b5a17e97bc260c557b2d16a3782f8a/tarball.
GitHub examples
Base site URL
This is for the base URL https://github.com.
{{repo link|site=gh}}.
{{repo link|site=gh|full=1}}.
User repository
{{repo link | site = gh | user = hamzaalloush | repo = fgradar-clone }}.
github/hamzaalloush/fgradar-clone.
User repository prefixed with $FG_ROOT
{{repo link | site = gith | user = bhugh | repo = Bombable | line = 30 | path = Aircraft/A-10-Bombable/A-10-Bombable-set.xml | pre = $FG_ROOT }}.
$FG_ROOT/Aircraft/A-10-Bombable/A-10-Bombable-set.xml#L30.
The c172p-detailed repository
This is for the c172p-detailed repository https://github.com/Juanvvc/c172p-detailed/tree/master (this is the same as https://github.com/Juanvvc/c172p-detailed).
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | text = A high detailed version of the C172P aircraft for FlightGear }}
A high detailed version of the C172P aircraft for FlightGear.
Git clone
This is for cloning the c172p-detailed aircraft with git clone https://github.com/Juanvvc/c172p-detailed.git
.
{{#tag:code | {{#tag:nowiki | {{repo link | site = gh | cmd = git clone | user = Juanvvc | repo = c172p-detailed | type = git | full = 1 }} }} }}
git clone https://github.com/Juanvvc/c172p-detailed.git
File with line number
This is for https://github.com/Juanvvc/c172p-detailed/blob/release/2016.1/c172p-set.xml#L49.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = blob | branch = release/2016.1 | path = c172p-set.xml | line = 49 | text = The c172p-detailed authors }}.
Raw view
This is for https://github.com/Juanvvc/c172p-detailed/raw/master/c172p-set.xml, which will redirect itself to https://raw.githubusercontent.com/Juanvvc/c172p-detailed/master/c172p-set.xml.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = raw | path = c172p-set.xml | full = 1 }}.
https://github.com/Juanvvc/c172p-detailed/raw/master/c172p-set.xml.
Commit
This is for https://github.com/Juanvvc/c172p-detailed/commit/df6f10608116674643a3cc4bf18819eeee016d42.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = commit | commit = df6f10608116674643a3cc4bf18819eeee016d42 }}.
github/Juanvvc/c172p-detailed/df6f10608116674643a3cc4bf18819eeee016d42 commit view.
Tree view at a given commit
This is for https://github.com/Juanvvc/c172p-detailed/tree/df6f10608116674643a3cc4bf18819eeee016d42.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = tree | commit = df6f10608116674643a3cc4bf18819eeee016d42 }}.
github/Juanvvc/c172p-detailed/df6f10608116674643a3cc4bf18819eeee016d42.
Main views
History view
This is for https://github.com/Juanvvc/c172p-detailed/commits/master.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = commits }}.
github/Juanvvc/c172p-detailed/master history view.
History view from a commit
This is for https://github.com/Juanvvc/c172p-detailed/commits/df6f10608116674643a3cc4bf18819eeee016d42.
{{repo link | site = gh | user = Juanvvc | repo = c172p-detailed | view = commits | commit = df6f10608116674643a3cc4bf18819eeee016d42 }}.
github/Juanvvc/c172p-detailed/df6f10608116674643a3cc4bf18819eeee016d42 history view.
Zip archive download
Default
This is for https://github.com/Juanvvc/c172p-detailed/archive/master.zip.
{{repo link | site = github | proj = Juanvvc | repo = c172p-detailed | type = zip | full = 1 }}.
https://github.com/Juanvvc/c172p-detailed/archive/master.zip.
Branch
This is for https://github.com/Juanvvc/c172p-detailed/archive/release/2016.1.zip.
{{repo link | site = github | proj = Juanvvc | repo = c172p-detailed | branch = release/2016.1 | type = zip | full = 1 }}.
https://github.com/Juanvvc/c172p-detailed/archive/release/2016.1.zip.
Commit
This is for https://github.com/Juanvvc/c172p-detailed/archive/c9cef81a899201802b32109c43ca686bbeffdb42.zip.
{{repo link | site = github | proj = Juanvvc | repo = c172p-detailed | commit = c9cef81a899201802b32109c43ca686bbeffdb42 | type = zip | full = 1 }}.
https://github.com/Juanvvc/c172p-detailed/archive/c9cef81a899201802b32109c43ca686bbeffdb42.zip.
GitLab examples
Base site URL
This is for the base URL https://gitlab.com.
{{repo link|site=gl}}.
{{repo link|site=gl|full=1}}.
User repository
This is for https://gitlab.com/emilianh/Lockheed-L10-Electra.
{{repo link | site = gl | user = emilianh | repo = Lockheed-L10-Electra }}
gitlab/emilianh/Lockheed-L10-Electra/master
Or:
{{repo link | site = gl | user = emilianh | repo = Lockheed-L10-Electra | full = 1 }}
https://gitlab.com/emilianh/Lockheed-L10-Electra
The FlightGear Multiplayer server software
This should produce git clone https://gitlab.com/fgms/fgms-0-x.git
.
{{#tag:syntaxhighlight| {{repo link | site = gitlab | cmd = git clone | proj = fgms | repo = fgms-0-x | type = git | full = 1 }} | lang = "sh" }}
git clone https://gitlab.com/fgms/fgms-0-x.git
File
This is for https://gitlab.com/fg-radi/osm2city/blob/master/osm2city.py.
{{repo link | site = gitlab | proj = fg-radi | repo = osm2city | path = osm2city.py | full = 1 }}.
https://gitlab.com/fg-radi/osm2city/blob/master/osm2city.py.
File and a branch
This is for https://gitlab.com/tortoisegit/tortoisegit/blob/REL_1.8.16.0_EXTERNAL/release.txt.
{{repo link | site = gitlab | proj = tortoisegit | repo = tortoisegit | branch = REL_1.8.16.0_EXTERNAL | path = release.txt | full = 1 }}.
https://gitlab.com/tortoisegit/tortoisegit/blob/REL_1.8.16.0_EXTERNAL/release.txt.
File and a commit
This is for https://gitlab.com/extra500/extra500/blob/20ac59/extra500-set.xml.
{{repo link | site = gitlab | proj = extra500 | repo = extra500 | commit = 20ac59ad | path = extra500-set.xml | full = 1 }}.
https://gitlab.com/extra500/extra500/blob/20ac59ad/extra500-set.xml.
File with line number
This is for https://gitlab.com/mdanil/Tu-144/blob/master/Models/Tu-144.xml#L8-14.
{{repo link | site = gitlab | user = mdanil | repo = Tu-144 | view = blob | branch = master | path = Models/Tu-144.xml | line = 8-14 | full = 1 }}.
https://gitlab.com/mdanil/Tu-144/blob/master/Models/Tu-144.xml#L8-14.
Raw view
This is for https://gitlab.com/extra500/extra500/raw/20ac59/extra500-set.xml.
{{repo link | site = gitlab | proj = extra500 | repo = extra500 | view = raw | commit = 20ac59 | path = extra500-set.xml | full = 1 }}.
https://gitlab.com/extra500/extra500/raw/20ac59/extra500-set.xml.
Commit
This is for https://gitlab.com/extra500/extra500/commit/20ac59ad.
{{repo link | site = gitlab | proj = extra500 | repo = extra500 | view = commit | commit = 20ac59ad | full = 1 }}.
https://gitlab.com/extra500/extra500/commit/20ac59ad.
Tree view at a given commit
This is for https://gitlab.com/extra500/extra500/tree/20ac59ad.
{{repo link | site = gitlab | proj = extra500 | repo = extra500 | view = tree | commit = 20ac59ad | full = 1 }}.
https://gitlab.com/extra500/extra500/tree/20ac59ad.
Main views
History view
This is for https://gitlab.com/mailman/mailman/commits/master.
{{repo link | site = gl | user = mailman | repo = mailman | view = commits | full = 1 }}.
https://gitlab.com/mailman/mailman/commits/master.
History view from a commit
This is for https://gitlab.com/mailman/mailman/commits/1236a9cf.
{{repo link | site = gl | user = mailman | repo = mailman | view = commits | commit = 1236a9cf | full = 1 }}.
https://gitlab.com/mailman/mailman/commits/1236a9cf.
Zip archive download
This is for https://gitlab.com/extra500/extra500/repository/archive.zip?ref=FG/2016.1.
{{repo link | site = gitlab | proj = extra500 | repo = extra500 | branch = FG/2016.1 | type = zip | full = 1 }}
https://gitlab.com/extra500/extra500/repository/archive.zip?ref=FG/2016.1
Zip archive download with tag
This is for https://gitlab.com/emilianh/IAR80/repository/archive.zip?ref=latest.
{{repo link | site = gitlab | proj = emilianh | repo = IAR80 | tag = latest | type = zip | full = 1 }}
https://gitlab.com/emilianh/IAR80/repository/archive.zip?ref=latest
Gitorious archive examples
Note The Gitorious open source infrastructure is locked in a read-only archived state. |
Base site URL
This is for the base URL https://gitorious.org.
{{repo link|site=go}}.
{{repo link|site=go|full=1}}.
The old FlightGear source repository
This is for the archived flightgear repository at https://gitorious.org/fg/flightgear.git. The automatically created URL, which is equivalent, should be https://gitorious.org/fg/flightgear?p=fg:flightgear.git;a=summary.
{{repo link | site = gito | proj = fg | repo = flightgear | text = The archived flightgear source code repository at Gitorious }}.
The archived flightgear source code repository at Gitorious.
The historic fgdata repository
This is for the historic repository https://gitorious.org/fg/fgdata.git. The automatically created URL, which is equivalent, should be https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.
{{repo link | site = gito | proj = fg | repo = fgdata | text = The archived fgdata repository at Gitorious, with full history from 2000-2015 }}.
The archived fgdata repository at Gitorious, with full history from 2000-2015.
File and branch in the historic fgdata repository
{{repo link | site = gito | proj = fg | repo = fgdata | path = Aircraft-uiuc/Cessna172/aircraft.dat | branch = release/3.2.0 | full = 1 }}
File and tag in the historic fgdata repository
{{repo link | site = gito | proj = fg | repo = fgdata | path = Aircraft-uiuc/Cessna172/aircraft.dat | tag = version/3.4.0/~ | full = 1 }}
Git clone
This is for cloning the historic fgdata repository with git clone https://gitorious.org/fg/fgdata.git
.
{{#tag:code|{{#tag:nowiki|{{repo link | site = gito | cmd = git clone | proj = fg | repo = fgdata | type = git | full = 1 }}}}}}.
git clone https://gitorious.org/fg/fgdata.git
.
File with line number
{{repo link | site = gito | proj = fg | repo = hoorays-fgdata | view = blob | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | line = 1 | text = Scripted AI Objects repo }}.
File prefixed with $NASAL_SRC
{{repo link | site = gito | proj = fg | repo = hoorays-fgdata | view = blob | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | pre = $NASAL_SRC | simplepath = 1 }}.
Raw view
{{repo link | site = gito | proj = fg | repo = hoorays-fgdata | view = raw | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | full = 1 }}.
Branch
This is for https://gitorious.org/fg/toms-fgdata?p=fg:toms-fgdata.git;a=shortlog;h=refs/heads/canvas-gui-demo.
{{repo link | site = go | proj = fg | repo = toms-fgdata | branch = canvas-gui-demo | full = 1 }}.
https://gitorious.org/fg/toms-fgdata?p=fg:toms-fgdata.git;a=shortlog;h=refs/heads/canvas-gui-demo.
Commit
{{repo link | site = gito | proj = nasal-standalone | repo = nasal-experiments | view = commit | commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280 | pre = $NASAL_SRC }}.
Commit with file path
{{repo link | site = gito | proj = fg | repo = fgdata | path = Nasal/canvas/map/TFC.lcontroller | view = blob | commit = c78b2f936891bffad49e27d84d952a0d45540eef | full = 1 }}.
Commitdiff
{{repo link | site = gito | proj = nasal-standalone | repo = nasal-experiments | view = commitdiff | commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280 | pre = $NASAL_SRC }}.
Main views
Summary view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.
{{repo link | site = gito | proj = fg | repo = fgdata | view = summary | full = 1 }}.
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.
Shortlog view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=shortlog.
{{repo link | site = gito | proj = fg | repo = fgdata | view = shortlog | full = 1 }}.
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=shortlog.
Log view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38.
{{repo link | site = gito | proj = fg | repo = fgdata | view = log | commit = 4c03a4968d2844c9c8ba734116da3478a1bebb38 | full = 1 }}.
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38.
Log with branch
This is for https://gitorious.org/fg/hoorays-flightgear?p=fg:hoorays-flightgear.git;a=log;h=refs/heads/topics/ada-support.
{{repo link | site = gito | proj = fg | repo = hoorays-flightgear | view = log | branch = topics/ada-support | full = 1 }}.
Merge requests
Default view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=commit;h=refs/merge-requests/190.
{{repo link | site = go | proj = fg | repo = fgdata | mr = merge-requests/190 | full = 1 }}.
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=commit;h=refs/merge-requests/190.
Commit view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=commit;h=refs/merge-requests/190.
{{repo link | site = go | proj = fg | repo = fgdata | view = commit | mr = merge-requests/190 }}.
gitorious/fg/fgdata/merge-requests/190.
Or as a URL:
{{repo link | site = go | proj = fg | repo = fgdata | view = commit | mr = merge-requests/190 | full = 1 }}.
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=commit;h=refs/merge-requests/190.
Generic repository handling
OpenSceneGraph svn repository
This should create svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
.
{{#tag:code|{{#tag:nowiki|{{repo link | site = svn.openscenegraph.org | cmd = svn co | protocol = http | type = svn | proj = osg | repo = OpenSceneGraph | post = osg | full = 1 }}}}}}.
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
.
OpenSceneGraph branch and file
This should create svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
{{#tag:code|{{#tag:nowiki|{{repo link | site = svn.openscenegraph.org | cmd = svn co | protocol = http | type = svn | proj = osg | repo = OpenSceneGraph | branch = branches/OpenSceneGraph-3.4 | path = src | post = osg_src | full = 1 }}}}}}.
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
Related templates
|