Author image William J. Middleton

NAME

VCS::PVCS::Folder - Folder class for for VCS::PVCS.

SYNOPSIS

  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
  }

DESCRIPTION

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.

METHODS

openFolders
  $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
  @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.

newArchive
  $Folder->newArchive($file,$archivedir);

Create a new archive and place a copy into the folder.

getWD
  $WorkingDir =  $folder->getWD;

Return the working directory for the folder.

getAttributes
  $Folder->getAttributes([vcs opts])';

Populate the attributes object for each archive object member of the folder.

get
  $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.

checkout
  Convenience routine calls $folder->get()
co
  Convenience routine calls $folder->get()
put
  $Folder->put([put opts]);

Checkin all of the archive members of the folder. Use opts to change default actions.

checkin
  Convenience routine calls put()
ci
  Convenience routine calls put()
vlog
  $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.

log
  Convenience routine calls vlog()
history
  Convenience routine calls vlog()
lock
  $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.

unlock
  $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.

addVersionLabel
  $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.

deleteVersionLabel
  $Folder->deleteVersionLabel($label,[vcs opts]);

Delete a version label from all of the archive members of the folder.

replaceVersionLabel
  $Folder->replaceVersionLabel($newlabel,$oldlabel,[vcs opts]);

Rename a version label in all of the archive members of the folder.

addFloatingVersionLabel
  $Folder->addFloatingVersionLabel($label,[vcs opts]);

Create a floating version label for all of the archive members of the folder.

transformVersionLabel
  $Folder->transformVersionLabel($label,[vcs opts])';

Transform a specified version label to a floating version label for all of the archive members of the folder.

deletePromoGroup
  $Folder->deletePromoGroup($group,[vcs opts]);

Delete the promotion group from the archive for all archive members in the folder.

addPromoGroup
  $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

vcs
  $Folder->vcs([opts][files]);

Run vcs in the folder's CWD, with opts.

getAttributes
  $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.

COPYRIGHT

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.

AUTHOR

Bill Middleton, wjm@metronet.com

SUPPORT / WARRANTY

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.

SEE ALSO

VCS::PVCS::Project