Template:Fgaddon co: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Support for the 'login' parameter.)
m (Switch from the temporary {{project infrastructure/code}} template to {{project infrastructure}} template with the mode set to 'abbrev'.)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#tag:nowiki|{{repo link
{{#tag:nowiki|{{repo link
| site                             = {{project infrastructure|abbrev}}
| site                                             = {{project infrastructure|abbrev}}
| cmd                               = svn co {{{opt|}}}
| cmd                                               = svn co
| protocol                         = {{#if: {{{login|}}} | svn+ssh | https}}
| opt{{#if:{{{opt|}}}||NULL}}                      = {{{opt}}}
| login{{#if:{{{login|}}}||NULL}}           = {{{login}}}
| protocol                                         = {{#if: {{{login|}}} | svn+ssh | https}}
| type                             = svn
| login{{#if:{{{login|}}}||NULL}}                   = {{{login}}}
| repo                             = fgaddon
| type                                             = svn
| branch{{#if:{{{branch|}}}||NULL}} = {{{branch}}}
| repo                                             = fgaddon
| path{{#if:{{{path|}}}||NULL}}    = {{{path}}}
| branch{{#if:{{{branch|{{{b|{{{1|}}}}}}}}}||NULL}} = {{{branch|{{{b|{{{1}}}}}}}}}
| post                             = {{{post|fgaddon}}}
| path{{#if:{{{path|{{{f|{{{2|}}}}}}}}}||NULL}}    = {{{path|{{{f|{{{2}}}}}}}}}
| full                             = 1
| post                                             = {{{post|fgaddon}}}
}} }}<noinclude>
| full                                             = 1
}}}}<noinclude>
{{Informative template|1=
{{Informative template|1=
__NOTOC__
__NOTOC__
Line 16: Line 17:
To provide a consistent representation of the command to checkout the FGAddon subversion repository.
To provide a consistent representation of the command to checkout the FGAddon subversion repository.


== Usage ==
{{repo link/doc usage
  {{obr}}'''fgaddon co'''
| template = fgaddon co
{{!}} ''opt''    =
| value_cmd = svn co
{{!}} ''login''  =
| opt       = 1
{{!}} ''branch'' =
| login     = 1
{{!}} ''path''   =
| branch   = 1 | short_branch = b | pos_branch = 1
{{!}} ''post''  =
| path     = 1 | short_path  = f | pos_path   = 2
{{cbr}}
| post     = 1 | default_post = fgaddon
 
| sf        = 1
; opt: Any additional options to show after <code>svn co</code>.
| svn       = 1
 
| break    = 0
; login: The optional user login.
}}
 
; branch: The svn branch or tag name.  This defaults to '''trunk'''.
 
; path: The file path.


; post: Any optional text to show after the URL.  This defaults to '''flightgear-fgaddon'''.
{{repo link/doc plain text}}


== Examples ==
== Examples ==
Line 72: Line 69:
| post  =
| post  =
}}
}}
=== Aliased parameters ===
{{obr}}fgaddon co
{{!}} b = branches/release-3.2.0
{{!}} f = Aircraft/V22-Osprey
{{cbr}}.
{{fgaddon co
| b = branches/release-3.2.0
| f = Aircraft/V22-Osprey
}}.
=== Numbered parameters ===
{{obr}}fgaddon co {{!}} branches/release-3.2.0 {{!}} Aircraft/V22-Osprey {{cbr}}.
{{fgaddon co | branches/release-3.2.0 | Aircraft/V22-Osprey }}.


== Related templates ==
== Related templates ==

Latest revision as of 15:58, 20 June 2019

svn co https://svn.code.sf.net/p/flightgear/fgaddon/trunk fgaddon

The following template description is not displayed when the template is inserted in an article.

Goal

To provide a consistent representation of the command to checkout the FGAddon subversion repository.

Usage

{{fgaddon co
| opt        =
| login      =
| branch     =
| path       =
| post       =
}}

The parameters are:

Parameter Description Abbreviated
parameter
Numbered
parameter
Status
opt Any additional options to show after the command svn co, but before the URL. optional
login The optional user login. 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 trunk. b 1 optional
path The file or directory path. f 2 optional
post Text to append. This is forms a set with the parameter opt. For example it can represent any command line options that come after the URL. The default value is fgaddon. optional

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

Checkout of trunk with user name

{{fgaddon co
| opt  = --username <username>
| post = fgaddon
}}

svn co --username <username> https://svn.code.sf.net/p/flightgear/fgaddon/trunk fgaddon

Checkout of aircraft from a branch

{{fgaddon co
| branch = branches/release-3.4.0
| path   = Aircraft/V22-Osprey
| post   =
}}

svn co https://svn.code.sf.net/p/flightgear/fgaddon/branches/release-3.4.0/Aircraft/V22-Osprey

Checkout of aircraft as a user

{{fgaddon co
| login = <username>
| path  = Aircraft/wrightFlyer1903
| post  = 
}}

svn co svn+ssh://<username>@svn.code.sf.net/p/flightgear/fgaddon/trunk/Aircraft/wrightFlyer1903

Aliased parameters

{{fgaddon co
| b = branches/release-3.2.0
| f = Aircraft/V22-Osprey
}}.

svn co https://svn.code.sf.net/p/flightgear/fgaddon/branches/release-3.2.0/Aircraft/V22-Osprey fgaddon.

Numbered parameters

{{fgaddon co | branches/release-3.2.0 | Aircraft/V22-Osprey }}.

svn co https://svn.code.sf.net/p/flightgear/fgaddon/branches/release-3.2.0/Aircraft/V22-Osprey fgaddon.

Related templates