Svn exists: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
r12198
 
imported>Bale
fix code sample
 
(One intermediate revision by the same user not shown)
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>}}|
cli_equiv=The CLI command "svn list" will provide similar information.|
see_also={{SeeAlso|svn_at_head|svn_info}}|
}}
}}


[[Category:Miscellaneous Functions]]
[[Category:Miscellaneous Functions]]

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.

See Also

svn_at_head() | svn_info()