Difference between pages "My companion" and "Svn at head"
(Difference between pages)
Jump to navigation
Jump to search
imported>Bale (r11965) |
imported>Bale (r12198) |
||
Line 1: | Line 1: | ||
{{ | {{ | ||
− | #vardefine:name| | + | #vardefine:name|svn_at_head}}{{ |
− | #vardefine:return_type| | + | #vardefine:return_type|boolean}}{{ |
FunctionPage| | FunctionPage| | ||
Line 10: | Line 10: | ||
aggregate={{#var:aggregate}}| | aggregate={{#var:aggregate}}| | ||
return_type={{#var:return_type}}| | return_type={{#var:return_type}}| | ||
− | return_also={{#var:return_also}} | + | return_also={{#var:return_also}}| |
+ | parameter1={{Param|string|projectname}}| | ||
+ | p1desc={{Pspan|projectname}} is the name of a project which may exist on an SVN repo| | ||
}}| | }}| | ||
− | function_description= | + | function_description=Returns true if {{Pspan|projectname}} exists, is a valid working copy, and is currently at the same revision number as the repository. {{Pspan|projectname}} will match any unique substring of any project in the /svn folder, but it is case sensitive.| |
code1={{CodeSample| | code1={{CodeSample| | ||
− | title=Code | + | title=Code Sample| |
− | description= | + | description=Checks for a project| |
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | if( | + | if( !svn_at_head( "mafiachit" ) ) { |
− | + | print( "ChIT is not up to date! If you want to update it, copy/paste the following line into your CLI and hit enter." ); | |
− | + | print( "svn update mafiachit", "blue" ); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | </syntaxhighlight> | + | </syntaxhighlight>}}| |
− | }}| | + | cli_equiv=The CLI command "svn list" will provide related information.| |
− | + | see_also={{SeeAlso|svn_exists|svn_info}}| | |
}} | }} | ||
− | [[Category: | + | [[Category:Miscellaneous Functions]] |
Latest revision as of 00:44, 12 November 2014
Function Syntax
boolean svn_at_head(string projectname )
- projectname is the name of a project which may exist on an SVN repo
Returns true if projectname exists, is a valid working copy, and is currently at the same revision number as the repository. projectname will match any unique substring of any project in the /svn folder, but it is case sensitive.
Code Sample
Checks for a project
if( !svn_at_head( "mafiachit" ) ) {
print( "ChIT is not up to date! If you want to update it, copy/paste the following line into your CLI and hit enter." );
print( "svn update mafiachit", "blue" );
}
CLI Equivalent
The CLI command "svn list" will provide related information.