Cvs(3pm) | User Contributed Perl Documentation | Cvs(3pm) |
Cvs - Object oriented interface to the CVS command
use Cvs; my $cvs = new Cvs ( '/path/to/repository/for/module', cvsroot => ':pserver:user@host:/path/to/cvs', password => 'secret' ) or die $Cvs::ERROR; $cvs->checkout('module'); ... my $status = $cvs->status('file'); if($status->is_modified) { $cvs->commit('file'); } $cvs->release({delete_after => 1}); $cvs->logout();
bla bla
Cvs = new Cvs ["workdir"] [key => "value" [, ...]]; my $obj = new Cvs "workdir"; my $obj = new Cvs "workdir", cvsroot => "/path/to/cvsroot"; my $obj = new Cvs cvsroot => ":pserver:user\@host:/path/to/cvs";
Create a new Cvs object for the repository given in argument. Note that the working directory doesn't need to already exist.
Allowed parameters are:
Cvs::Result::Checkout = $obj->checkout("module", {key => "value"});
Checkout the module "module" in the repository (the one that served to create the Cvs object) from the cvsroot given in parameter.
Allowed parameters are:
Cvs::Result::Checkout.
Cvs::Result::Update = $cvs->update();
Cvs::Result::Update.
Cvs::Result::StatusItem = $cvs->status("file"); Cvs::Result::StatusList = $cvs->status("file1", "file2", {multiple => 1});
Get the status of one of more files.
Allowed parameters are:
Cvs::Result::StatusItem, Cvs::Result::StatusList
Cvs::Result::DiffItem = $cvs->diff(); Cvs::Result::DiffList = $cvs->diff({multiple => 1});
Cvs::Result::DiffItem, Cvs::Result::DiffList.
Cvs::Result::RdiffList = $cvs->rdiff("module", {from_revision => $rev});
Cvs::Result::RdiffList.
Cvs::Result::Log = $cvs->log();
Cvs::Result::Log.
Cvs::Result::Tag = $cvs->tag("tag");
Cvs::Result::Tag.
Cvs::Result::Tag = $cvs->rtag("module", "tag");
Cvs::Result::Rtag.
Cvs::Result::Release = $cvs->release(); Cvs::Result::Release = $cvs->release('module', ..., {force => 1});
Call the release command.
If call with no directories to release, self repository will be released.
Cvs::Result::Release
Cvs::Result::Export = $obj->export("module", {key => "value"});
Checkout the module "module" in the repository (the one that served to create the Cvs object) from the cvsroot given in parameter, but without the CVS administrative directories.
Allowed parameters are the same as for checkout. However, one of the options 'revision' or 'date' must be specified.
my @modules = $cvs->module_list();
Returns the list of all modules which can be riched on the CVSROOT. This method do something that cvs doesn't implement by itself, we use a little trick to get this list, and this perhaps not work with all cvs versions.
Do not mix up this method with the "-c" argument of the cvs' checkout sub-command.
Returns the Cvs::Cvsroot object.
Returns the full path of the working directory
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 2003 - Olivier Poitrey
2024-03-05 | perl v5.38.2 |