Svn at head

From Kolmafia
Revision as of 00:44, 12 November 2014 by imported>Bale (r12198)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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()