NAME
RackMan::SCM - Perform basic operations with any SCM
SYNOPSIS
use RackMan::SCM;
chdir "src";
my $scm = RackMan::SCM->new({ type => "git", path => "src" });
$scm->update;
my $file = "lipsum.txt";
open my $fh, ">", $file or die $!;
print {$fh} "Lorem ipsum sit amet";
close $fh;
$scm->add($file);
$scm->commit($file, "added $file for great justice");
DESCRIPTION
This module allows to perform basic operations in a generic way, whatever the backend SCM is. It can be seen as a kind of very lightweight VCI. It currently knows the following SCM: CVS, Subversion, Bazaar, Mercurial, Git.
When possible, use the get_scm()
method of a RackMan
instance to obtain the SCM expected by the user.
METHODS
new
create and return a new object
update
update the given path
add
add the given path
commit
commit the given path with the given message
ATTRIBUTES
type
String, indicates the type of SCM to use: cvs
, svn
, bzr
, hg
, git
path
String, current working directory
prefix
String, prefix printed before the command when in verbose mode
verbose
Boolean, whether the command are to be printed before being executed
AUTHOR
Sebastien Aperghis-Tramoni (sebastien@aperghis.net)