Difference between revisions of "Svn info"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(r12215)
 
imported>AlbinoRhino
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{
 
{{
#vardefine:name|svn_at_head}}{{
+
#vardefine:name|svn_info}}{{
 
#vardefine:return_type|record}}{{
 
#vardefine:return_type|record}}{{
  
Line 32: Line 32:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
print( "To install ChIT, copy/paste the following line into your CLI and hit enter." );
 
print( "To install ChIT, copy/paste the following line into your CLI and hit enter." );
print( "svn checkout " + svn_info( "mafiachit" ).svn, "blue" );
+
print( "svn checkout " + svn_info( "mafiachit" ).url, "blue" );
 
</syntaxhighlight>}}|
 
</syntaxhighlight>}}|
 
cli_equiv=The CLI command "svn list" provides a list of all installed scripts.|
 
cli_equiv=The CLI command "svn list" provides a list of all installed scripts.|

Latest revision as of 06:36, 17 October 2017

Function Syntax

record svn_info(string projectname )

  • projectname is the name of a project which may exist on an SVN repo

Provides information about a given project. projectname will match any unique substring of any project in the /svn folder, but it is case sensitive. It returns a record with five fields:

record {
   string url;                 // The url that the project was checked out from
   int revision;               // The revision that the working copy is at
   string last_changed_author; // The author who committed the last change
   int last_changed_rev;       // The revision that most recently modified this working copy (note, not necessarily the same as revision field)
   string last_changed_date;   // The date/time when lastChangedRevision happened
};

Code Sample

Checks svn repo for a project

print( "To install ChIT, copy/paste the following line into your CLI and hit enter." );
print( "svn checkout " + svn_info( "mafiachit" ).url, "blue" );

CLI Equivalent

The CLI command "svn list" provides a list of all installed scripts.

See Also

svn_exists() | svn_at_head()