Svn exists

From Kolmafia
Jump to navigation Jump to search

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", "blue" );

CLI Equivalent

The CLI command "svn list" will provide similar information.

See Also

svn_at_head() | svn_info()