Template:Gitorious source: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created the {{gitorious source}} template specific for all archived Gitorious repositories, as a subtemplate of the master {{repo link}} template.)
 
(Update of the documentation to match {{repo link}}, which should now be fully functional for Gitorious, with many new examples added, and removal of the 'subdom' parameter.)
Line 5: Line 5:
| type{{#if:{{{type|}}}||NULL}}            = {{{type}}}
| type{{#if:{{{type|}}}||NULL}}            = {{{type}}}
| proj                                      = {{{proj|fg}}}
| proj                                      = {{{proj|fg}}}
| subdom{{#if:{{{subdom|}}}||NULL}}        = {{{subdom}}}
| repo                                      = {{{repo|flightgear}}}
| repo                                      = {{{repo|flightgear}}}
| branch{{#if:{{{branch|}}}||NULL}}        = {{{branch}}}
| branch{{#if:{{{branch|}}}||NULL}}        = {{{branch}}}
Line 30: Line 29:
  {{!}} ''type''      =
  {{!}} ''type''      =
  {{!}} ''proj''      =
  {{!}} ''proj''      =
{{!}} ''subdom''    =
  {{!}} ''repo''      =
  {{!}} ''repo''      =
  {{!}} ''branch''    =
  {{!}} ''branch''    =
Line 52: Line 50:


; proj: The name of the project, consisting of a grouping of repositories on the open source infrastructure.  This defaults to '''fg'''.
; 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'''.
; 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'''.
Line 65: Line 61:
; line: Line number of the file to display.
; line: Line number of the file to display.


; view:  View to display, one of ''blob''', '''commit''', '''history''', or '''log'''.  The default is '''blob'''.
; view:  View to display, one of '''summary''', '''shortlog''', '''log''', '''blob''', '''commit''', '''commitdiff''', '''tree''', '''history''', or '''raw'''.  The default is '''blob''' if a path is given, '''commit''' if a commit is given, or '''summary''' otherwise.


; text: Text to display as the link label.  Overrides '''pre'''.
; text: Text to display as the link label.  Overrides '''pre'''.
Line 81: Line 77:


=== The old FlightGear source repository ===
=== The old FlightGear source repository ===
This is for the archived flightgear repository at https://gitorious.org/fg/flightgear.git.
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.


  {{obr}}gitorious source
  {{obr}}gitorious source
Line 92: Line 88:


=== The historic fgdata repository ===
=== The historic fgdata repository ===
This is for the historic fgdata repository https://gitorious.org/fg/fgdata.git.
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.


  {{obr}}gitorious source
  {{obr}}gitorious source
Line 126: Line 122:


=== File with line number ===
=== 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.
This is for https://gitorious.org/fg/hoorays-fgdata?p=fg:hoorays-fgdata.git;a=blob;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule#l1.


  {{obr}}gitorious source
  {{obr}}gitorious source
Line 147: Line 143:


=== File prefixed with $NASAL_SRC ===
=== 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.
This is for https://gitorious.org/fg/hoorays-fgdata?p=fg:hoorays-fgdata.git;a=blob;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule.


  {{obr}}gitorious source
  {{obr}}gitorious source
{{!}} repo      = hoorays-fgdata
{{!}} view      = blob
{{!}} branch    = topics/scriptable-ai-submodule
{{!}} path      = Nasal/ai/ai.nas
{{!}} pre        = $NASAL_SRC
{{!}} simplepath = 1
{{cbr}}
{{gitorious source
|repo      = hoorays-fgdata
|view      = blob
|branch    = topics/scriptable-ai-submodule
|path      = Nasal/ai/ai.nas
|pre        = $NASAL_SRC
|simplepath = 1
}}
===== Raw view =====
This is for https://gitorious.org/fg/hoorays-fgdata?p=fg:hoorays-fgdata.git;a=blob_plain;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule.
{{obr}}repo link
{{!}} site  = gito
{{!}} proj  = fg
  {{!}} repo  = hoorays-fgdata
  {{!}} repo  = hoorays-fgdata
  {{!}} view  = blob
  {{!}} view  = raw
  {{!}} branch = topics/scriptable-ai-submodule
  {{!}} branch = topics/scriptable-ai-submodule
  {{!}} path  = Nasal/ai/ai.nas
  {{!}} path  = Nasal/ai/ai.nas
  {{!}} pre    = $NASAL_SRC/
  {{!}} full  = 1
  {{cbr}}
  {{cbr}}


{{gitorious source
{{repo link
|site  = gito
|proj  = fg
|repo  = hoorays-fgdata
|repo  = hoorays-fgdata
|view  = blob
|view  = raw
|branch = topics/scriptable-ai-submodule
|branch = topics/scriptable-ai-submodule
|path  = Nasal/ai/ai.nas
|path  = Nasal/ai/ai.nas
|pre    = $NASAL_SRC/
|full  = 1
}}
}}


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


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


{{gitorious source
{{gitorious source
|proj  = nasal-standalone
|proj  = nasal-standalone
|subdom = nasal-experiments
|repo  = nasal-experiments
|repo  = flightgear
|view  = commit
|view  = commit
|commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280
|commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280
|pre    = $NASAL_SRC/
|pre    = $NASAL_SRC
}}
 
=== Commitdiff ===
This is for https://gitorious.org/nasal-standalone/nasal-experiments?p=nasal-standalone:nasal-experiments.git;a=commitdiff;h=9b2d59c316d03b83cfb4352a38b865aa29f4c280.
 
{{obr}}gitorious source
{{!}} proj  = nasal-standalone
{{!}} repo  = nasal-experiments
{{!}} view  = commitdiff
{{!}} commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280
{{!}} pre    = $NASAL_SRC
{{cbr}}
 
{{gitorious source
|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.
 
{{obr}}gitorious source
{{!}} repo  = fgdata
{{!}} view  = summary
{{!}} full  = 1
{{cbr}}
 
{{gitorious source
|repo  = fgdata
|view  = summary
|full  = 1
}}
 
==== Shortlog view ====
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=shortlog.
 
{{obr}}gitorious source
{{!}} repo  = fgdata
{{!}} view  = shortlog
{{!}} full  = 1
{{cbr}}
 
{{gitorious source
|repo  = fgdata
|view  = shortlog
|full  = 1
}}
 
==== Log view ====
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38.
 
{{obr}}gitorious source
{{!}} repo  = fgdata
{{!}} view  = log
{{!}} commit = 4c03a4968d2844c9c8ba734116da3478a1bebb38
{{!}} full  = 1
{{cbr}}
 
{{gitorious source
|repo  = fgdata
|view  = log
|commit = 4c03a4968d2844c9c8ba734116da3478a1bebb38
|full  = 1
}}
}}


Line 192: Line 278:


[[Category:Repository link templates]]
[[Category:Repository link templates]]
</noinclude>

Revision as of 19:14, 27 February 2016

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       =
| 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.
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 summary, shortlog, log, blob, commit, commitdiff, tree, history, or raw. The default is blob if a path is given, commit if a commit is given, or summary otherwise.
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. The automatically created URL, which is equivalent, should be https://gitorious.org/fg/flightgear?p=fg:flightgear.git;a=summary.

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

{{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?p=fg:hoorays-fgdata.git;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?p=fg:hoorays-fgdata.git;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
| simplepath = 1
}}

$NASAL_SRC/Nasal/ai/ai.nas

Raw view

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

{{repo link
| site   = gito
| proj   = fg
| repo   = hoorays-fgdata
| view   = raw
| branch = topics/scriptable-ai-submodule
| path   = Nasal/ai/ai.nas
| full   = 1
}}

https://gitorious.org/fg/hoorays-fgdata?p=fg:hoorays-fgdata.git;a=blob_plain;f=Nasal/ai/ai.nas;hb=refs/heads/topics/scriptable-ai-submodule

Commit

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

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

$NASAL_SRC

Commitdiff

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

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

$NASAL_SRC

Main views

Summary view

This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.

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

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

{{gitorious source
| repo   = fgdata
| view   = log
| commit = 4c03a4968d2844c9c8ba734116da3478a1bebb38
| full   = 1
}}

https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38

Related templates