Svn exists: Difference between revisions
Jump to navigation
Jump to search
imported>Bale add: see also and cli equivalent |
imported>Bale fix code sample |
||
Line 24: | Line 24: | ||
if( !svn_exists( "mafiachit" ) ) { | if( !svn_exists( "mafiachit" ) ) { | ||
print( "You did not install ChIT to modify your charpane! If you want to fix this error, copy/paste the following line into your CLI and hit enter." ); | print( "You did not install ChIT to modify your charpane! If you want to fix this error, copy/paste the following line into your CLI and hit enter." ); | ||
print( "svn https://svn.code.sf.net/p/mafiachit/code", "blue" ); | print( "svn checkout https://svn.code.sf.net/p/mafiachit/code", "blue" ); | ||
} | } | ||
</syntaxhighlight>}}| | </syntaxhighlight>}}| |
Latest revision as of 00:50, 12 November 2014
Function Syntax
boolean svn_exists(string projectname )
- projectname is the name of a project which may exist on an SVN repo
Returns true if there is a valid working copy named projectname present in the /svn folder. projectname will match a unique substring of any project in the /svn folder, but it is case sensitive.
Code Sample
Checks for a project
if( !svn_exists( "mafiachit" ) ) {
print( "You did not install ChIT to modify your charpane! If you want to fix this error, copy/paste the following line into your CLI and hit enter." );
print( "svn checkout https://svn.code.sf.net/p/mafiachit/code", "blue" );
}
CLI Equivalent
The CLI command "svn list" will provide similar information.