Template:Openscenegraph co: Difference between revisions
(The 'opt' parameter is now sent into {{repo link}} as the 'opt' parameter, rather than being appended to 'cmd'.) |
(Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.) |
||
Line 1: | Line 1: | ||
{{#tag:nowiki|{{repo link | {{#tag:nowiki|{{repo link | ||
| site | | site = svn.openscenegraph.org | ||
| cmd | | cmd = svn co | ||
| opt{{#if:{{{opt|}}}||NULL}} | | opt{{#if:{{{opt|}}}||NULL}} = {{{opt}}} | ||
| protocol | | protocol = {{#if: {{{login|}}} | svn+ssh | http}} | ||
| login{{#if:{{{login|}}}||NULL}} | | login{{#if:{{{login|}}}||NULL}} = {{{login}}} | ||
| type | | type = svn | ||
| proj | | proj = osg | ||
| repo | | repo = OpenSceneGraph | ||
| branch{{#if:{{{branch|}}}||NULL}} = {{{branch}}} | | branch{{#if:{{{branch|{{{b|{{{1|}}}}}}}}}||NULL}} = {{{branch|{{{b|{{{1}}}}}}}}} | ||
| path{{#if:{{{path|}}}||NULL}} = {{{path}}} | | path{{#if:{{{path|{{{f|{{{2|}}}}}}}}}||NULL}} = {{{path|{{{f|{{{2}}}}}}}}} | ||
| post | | post = {{{post|osg}}} | ||
| full | | full = 1 | ||
}}}}<noinclude> | }}}}<noinclude> | ||
Line 24: | Line 24: | ||
| opt = 1 | | opt = 1 | ||
| login = 1 | | login = 1 | ||
| branch = 1 | | branch = 1 | short_branch = b | pos_branch = 1 | ||
| path = 1 | | path = 1 | short_path = f | pos_path = 2 | ||
| post = 1 | default_post = osg | | post = 1 | default_post = osg | ||
| svn = 1 | | svn = 1 | ||
Line 49: | Line 49: | ||
| login = <username> | | login = <username> | ||
}}}} | }}}} | ||
=== Aliased parameters === | |||
This should produce the text <code><nowiki>svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src</nowiki></code>. | |||
{{obr}}#tag:code{{!}}{{obr}}openscenegraph co | |||
{{!}} b = branches/OpenSceneGraph-3.4 | |||
{{!}} f = src | |||
{{!}} post = osg_src | |||
{{cbr}}{{cbr}}. | |||
{{#tag:code|{{openscenegraph co | |||
| b = branches/OpenSceneGraph-3.4 | |||
| f = src | |||
| post = osg_src | |||
}}}}. | |||
=== Numbered parameters === | |||
This should produce the text <code><nowiki>svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src</nowiki></code>. | |||
{{obr}}#tag:code{{!}}{{obr}}openscenegraph co {{!}} branches/OpenSceneGraph-3.4 {{!}} src {{!}} post = osg_src {{cbr}}{{cbr}}. | |||
{{#tag:code|{{openscenegraph co | branches/OpenSceneGraph-3.4 | src | post = osg_src }}}}. | |||
== Related templates == | == Related templates == |
Revision as of 11:22, 7 March 2016
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
Goal
To provide a consistent representation of the command to checkout the OpenSceneGraph subversion repository.
Usage
{{openscenegraph 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 osg. | optional |
Examples
Checkout of trunk
This should produce the text svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
.
{{openscenegraph co}}
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
Checkout of trunk with user name
This should produce the text svn co svn+ssh://<username>@svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
.
{{#tag:code|{{openscenegraph co | login = <username> }}}}
svn co svn+ssh://<username>@svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg
Aliased parameters
This should produce the text svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
{{#tag:code|{{openscenegraph co | b = branches/OpenSceneGraph-3.4 | f = src | post = osg_src }}}}.
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
Numbered parameters
This should produce the text svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
{{#tag:code|{{openscenegraph co | branches/OpenSceneGraph-3.4 | src | post = osg_src }}}}.
svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.4/src osg_src
.
Related templates
|