Template:Gitorious source

From FlightGear wiki
Revision as of 17:00, 27 February 2016 by Bugman (talk | contribs) (Created the {{gitorious source}} template specific for all archived Gitorious repositories, as a subtemplate of the master {{repo link}} template.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

gitorious/fg/flightgear/HEAD


The following template description is not displayed when the template is inserted in an article.
Note  The Gitorious open source infrastructure is locked in a read-only archived state.

Goal

This template is for creating links or URLs for the content of the version control repositories in the Gitorious archive. It is a subtemplate of the master {{repo link}} template designed to be specific for the Gitorious repositories.

Usage

{{gitorious source
| cmd        =
| type       =
| proj       =
| subdom     =
| repo       =
| branch     =
| path       =
| commit     =
| line       =

| view       = 
| text       = 
| pre        = 
| post       = 
| simplepath = 
| full       = 
}}

All parameters are optional.

cmd
An optional command line tool name + options to prepend to the URL. For example git clone.
type
Choose between the web interface or direct repository link. This can be either git or git web. The default is git web.
proj
The name of the project, consisting of a grouping of repositories on the open source infrastructure. This defaults to fg.
subdom
The project subdomain.
repo
The name of the repository, for example fgdata. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. This defaults to flightgear.
branch
The git branch or tag name. For git tags, simply append /~ to the tag name. This defaults to next.
path
The file path.
commit
The commit identifier (git hash). This defaults to next.
line
Line number of the file to display.
view
View to display, one of blob', commit, history, or log. The default is blob.
text
Text to display as the link label. Overrides pre.
pre
Prefix to a link label.
post
Text to append.
simplepath
If set, this strips off the repository name from the URL label, leaving just the contents of the path parameter.
Note The text parameter will override this.
full
If set, the full URL will be shown.

Examples

The old FlightGear source repository

This is for the archived flightgear repository at https://gitorious.org/fg/flightgear.git.

{{gitorious source
| 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 fgdata repository https://gitorious.org/fg/fgdata.git.

{{gitorious source
| 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.

Git clone

This is for cloning the historic fgdata repository with git clone https://gitorious.org/fg/fgdata.git.

{{#tag:code | {{#tag:nowiki |
  {{gitorious source
  | cmd      = git clone
  | repo     = fgdata
  | type     = git
  | full     = 1
  }}
}} }}

git clone https://gitorious.org/fg/fgdata.git

File with line number

This is for https://gitorious.org/fg/hoorays-fgdata.git/source/topics/scriptable-ai-submodule:Nasal/ai/ai.nas?a=blob;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule#l1.

{{gitorious source
| repo   = hoorays-fgdata
| view   = blob
| branch = topics/scriptable-ai-submodule
| path   = Nasal/ai/ai.nas
| lines  = 1
| text   = Scripted AI Objects repo
}}

Scripted AI Objects repo

File prefixed with $NASAL_SRC

This is for https://gitorious.org/fg/hoorays-fgdata.git/source/topics/scriptable-ai-submodule:Nasal/ai/ai.nas?a=blob;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule.

{{gitorious source
| repo   = hoorays-fgdata
| view   = blob
| branch = topics/scriptable-ai-submodule
| path   = Nasal/ai/ai.nas
| pre    = $NASAL_SRC/
}}

$NASAL_SRC//Nasal/ai/ai.nas

Commit

This is for https://gitorious.org/nasal-standalone/nasal-experiments/flightgear.git/?p=nasal-standalone:nasal-experiments.git;a=commit;h=9b2d59c316d03b83cfb4352a38b865aa29f4c280.

{{gitorious source
| proj   = nasal-standalone
| subdom = nasal-experiments
| repo   = flightgear
| view   = commit
| commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280
| pre    = $NASAL_SRC/
}}

$NASAL_SRC/

Related templates