Svn exists

From Kolmafia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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