Svn at head

From Kolmafia
Jump to navigation Jump to search

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.

See Also

svn_exists() | svn_info()