VCS::PVCS::Folder - Folder class for for VCS::PVCS.
use VCS::PVCS::Project; $project = new VCS::PVCS::Project("ProjectName");
# return ref to array of all folders in the project with SCRIPTS in the name
$folds = $project->openFolders("SCRIPTS"); foreach $folder (@$folds){ $folder->checkout; # Checkout all files in the folder to the WD }
This class implements a set of methods for operating on the directories, archive files, and workfiles which correspond to PVCS folders. It should not ordinarily be loaded directly, but rather, is an ISA to the VCS::PVCS::Project class, as shown above.
$folds = $project->openFolders("FOO"); # folders with FOO in the name @folds = $project->openFolders(".*"); # ALL folders in the project $folds = $project->openFolders("New Folder"); # create the folder
Return a ref to array (or an array) of all folders in the project with FOO in the name. If no match is found, the folder is created. The objects in this array are blessed into the VCS::PVCS::Folder class. openFolders() accepts partial name matches in the single argument. (Names are matched with grep(//))
@members = $folder->members("regexp");
Return an array (or ref to array) of blessed Archive objects which reside within the folder, and match the regexp. If no regexp is passed in, then return all of the archives in the project. These objects can then call the methods in the VCS::PVCS::Archive class.
$Folder->newArchive($file,$archivedir);
Create a new archive and place a copy into the folder.
$WorkingDir = $folder->getWD;
Return the working directory for the folder.
$Folder->getAttributes([vcs opts])';
Populate the attributes object for each archive object member of the folder.
$Folder->get([get opts]);
Checkout all of the archive members in the folder to the the folders' working directory. Use opts to change default actions.
Convenience routine calls $folder->get()
$Folder->put([put opts]);
Checkin all of the archive members of the folder. Use opts to change default actions.
Convenience routine calls put()
$Folder->vlog([vlog opts]);
Takes a full vlog on all of the archive members in the folder. Use opts to change default actions. Result in $PVCSOUTPUT.
Convenience routine calls vlog()
$Folder->lock($label|$version,[vcs opts]);
Locks the named revision (or rev spec'd by label) for all archive members in the folder. Use opts to change default action.
$Folder->unlock($label|$version,[vcs opts]);
unlocks the named revision (or rev spec'd by label) for all archive members of the folder. Use opts to change default action.
$Folder->addVersionLabel($label,[vcs opts]);
Create a new sticky version label for the all of the archive members of the folder (optionally with :<rev>). Use opts for additonal params.
$Folder->deleteVersionLabel($label,[vcs opts]);
Delete a version label from all of the archive members of the folder.
$Folder->replaceVersionLabel($newlabel,$oldlabel,[vcs opts]);
Rename a version label in all of the archive members of the folder.
$Folder->addFloatingVersionLabel($label,[vcs opts]);
Create a floating version label for all of the archive members of the folder.
$Folder->transformVersionLabel($label,[vcs opts])';
Transform a specified version label to a floating version label for all of the archive members of the folder.
$Folder->deletePromoGroup($group,[vcs opts]);
Delete the promotion group from the archive for all archive members in the folder.
$Folder->deletePromoGroup($group:$rev,[vcs opts])';
Add the archive, or promote it to, the named promotion group. For all of the archive members in the folder.
Create a new archive
$Folder->vcs([opts][files]);
Run vcs in the folder's CWD, with opts.
$Folder->getAttributes(@_);
Populates and returns the archive object associated with the archive for all archives in the folder.
This object is blessed into the VCS::PVCS::Attributes class.
The PVCS module is Copyright (c) 1998 Bill Middleton. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
Bill Middleton, wjm@metronet.com
The VCS::PVCS modules are free software.
THEY COME WITHOUT WARRANTY OF ANY KIND.
Commercial support agreements for Perl can be arranged via The Perl Clinic. See http://www.perl.co.uk/tpc for more details.
VCS::PVCS::Project
To install VCS::PVCS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCS::PVCS
CPAN shell
perl -MCPAN -e shell install VCS::PVCS
For more information on module installation, please visit the detailed CPAN module installation guide.