Template:Openscenegraph co: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created an initial template for checking out the primary OpenSceneGraph source code repository.)
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#tag:nowiki|{{repo link
{{#tag:nowiki|{{repo link
| site                             = svn.openscenegraph.org
| site                                             = svn.openscenegraph.org
| cmd                               = svn co {{{opt|}}}
| cmd                                               = svn co
| protocol                         = {{#if: {{{login|}}} | svn+ssh | http}}
| opt{{#if:{{{opt|}}}||NULL}}                      = {{{opt}}}
| login{{#if:{{{login|}}}||NULL}}   = {{{login}}}
| protocol                                         = {{#if: {{{login|}}} | svn+ssh | http}}
| type                             = svn
| login{{#if:{{{login|}}}||NULL}}                   = {{{login}}}
| proj                             = osg
| type                                             = svn
| repo                             = OpenSceneGraph
| proj                                             = osg
| branch{{#if:{{{branch|}}}||NULL}} = {{{branch}}}
| repo                                             = OpenSceneGraph
| path{{#if:{{{path|}}}||NULL}}    = {{{path}}}
| branch{{#if:{{{branch|{{{b|{{{1|}}}}}}}}}||NULL}} = {{{branch|{{{b|{{{1}}}}}}}}}
| post                             = {{{post|osg}}}
| path{{#if:{{{path|{{{f|{{{2|}}}}}}}}}||NULL}}    = {{{path|{{{f|{{{2}}}}}}}}}
| full                             = 1
| post                                             = {{{post|osg}}}
}} }}<noinclude>
| full                                             = 1
}}}}<noinclude>
 
{{Informative template|1=
{{Informative template|1=
__NOTOC__
__NOTOC__
Line 17: Line 19:
To provide a consistent representation of the command to checkout the OpenSceneGraph subversion repository.
To provide a consistent representation of the command to checkout the OpenSceneGraph subversion repository.


== Usage ==
{{repo link/doc usage
  {{obr}}'''openscenegraph co'''
| template = openscenegraph 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 = osg
| svn      = 1
| break    = 0
}}
 
== Examples ==
=== Checkout of trunk ===
This should produce the text <code><nowiki>svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg</nowiki></code>.


; opt: Any additional options to show after <code>svn co</code>.
{{obr}}openscenegraph co{{cbr}}


; login: The optional user login.
{{openscenegraph co}}


; branch: The svn branch or tag name. This defaults to '''trunk'''.
=== Checkout of trunk with user name ===
This should produce the text <code><nowiki>svn co svn+ssh://<username>@svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg</nowiki></code>.


; path: The file path.
{{obr}}#tag:code{{!}}{{obr}}openscenegraph co
{{!}} login = <username>
{{cbr}}{{cbr}}


; post: Any optional text to show after the URL.  This defaults to '''osg'''.
{{#tag:code|{{openscenegraph co
| login = <username>
}}}}


== Examples ==
=== Aliased parameters ===
=== Checkout of trunk with user name ===
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}}openscenegraph co
 
  {{!}} opt = --username <username>
  {{obr}}#tag:code{{!}}{{obr}}openscenegraph co
  {{cbr}}
  {{!}} 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}}.


{{openscenegraph co
{{#tag:code|{{openscenegraph co | branches/OpenSceneGraph-3.4 | src | post = osg_src }}}}.
| opt  = --username <username>
}}


== Related templates ==
== Related templates ==
Line 51: Line 76:
}}
}}


[[Category:Repository link templates]]
[[Category:SCM Instruction Templates]]
[[Category:SCM Instruction Templates]]
</noinclude>
</noinclude>

Latest revision as of 11:25, 7 March 2016

svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk osg


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