Package DE_EPAGES::Core::API::CVS
This module provides cvs commands and complex cvs actions.
Example |
my $CVS = DE_EPAGES::Core::API::CVS->new({ -q => '' }); $CVS->command( 'export', { '-d' => 'source', '-r' => 'relase_5_0_1' }, ['RND/epages/epages5'] ); |
@EXPORT_OK |
Functions
- CVSAdd
- CVSCommand
- Checkout
- Export
- GetExistingDirectories
- GetRevisionsByBranch
- GetRevisionsByBranchNumberByOutput
- GetRevisionsByOutput
- RemoveBranch
- RemoveTag
- SymbolicNames
- SymbolicNamesByOutput
- add
- command
- getDiffFiles
- new
CVSAdd
Adds a file or directory to CVS. Directories can be added recursively.
Syntax |
CVSAdd($FileOrDirectory, $hOptions); CVSAdd('DE_EPAGES/Core', { recursive => 1 }); |
Input |
|
CVSCommand
Executes an cvs command
Syntax |
$hOut = CVSCommand($Command, $aArguments, $hCVSOptions, $hCVSCommandOptions, $hOptions); |
Example |
$hOut = CVSCommand('add', ['test.pl'], { '-q' => '' }, { '-k' => 'b' }); |
Input |
|
Return |
|
Checkout
get the content of a repository by the given branch or tag name, including cvs helper directories.
Syntax |
Checkout($FileOrDirectory, $Tag, $hCVSOptions); |
Example |
Checkout('RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Core', 'B_patch_5_0_3'); |
Input |
|
Export
get the content of a repository by the given branch or tag name, without cvs helper directories.
Syntax |
Export($FileOrDirectory, $Tag, $hCVSOptions); |
Example |
Export('RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Core', 'B_patch_5_0_3'); |
Input |
|
GetExistingDirectories
get directories in repository, uses Export to get info.
Syntax |
GetExistingDirectories($FileOrDirectory, $Tag, $hCVSOptions); |
Input |
|
GetRevisionsByBranch
Returns the numeric revisions of a repository file by the given branch name.
Syntax |
$aRevisions = GetRevisionsByBranch($FileName, $Branch, $hCVSOptions); |
Example |
my $aRevisions = GetRevisionsByBranch('DE_EPAGES/Core/API/CVS.pm', 'B_patch_5_0_3'); |
Input |
|
Return |
|
GetRevisionsByBranchNumberByOutput
Returns the numeric revisions, see GetRevisionsByBranchName.
Syntax |
$aRevisions = GetRevisionsByBranchNumberByOutput($BranchNumber, $aLogOut); |
Example |
my $out_log = CVSCommand ('log', [$RemoteFileName], \%CVSOptions, undef, {'outlines' => 1}); my $hSymbolicNames = SymbolicNamesByOutput($out_log->{'outlines'}); return GetRevisionsByBranchNumberByOutput($hSymbolicNames->{$BrachName}, $out_log->{'outlines'}); |
Input |
|
Return |
|
GetRevisionsByOutput
Returns all revisions of a file.
Syntax |
$ahRevisions = GetRevisionsByOutput($aLogOut); |
Example |
my $out_log = CVSCommand ('log', [$RemoteFileName], \%CVSOptions, undef, {'outlines' => 1}); my $ahRevisions = GetRevisionsByOutput($out_log->{'outlines'}); |
Input |
|
Return |
|
RemoveBranch
removes a tags and revisions a branch.
Syntax |
RemoveBranch($FileOrDirectory, $Tag, $hCVSOptions); |
Input |
|
RemoveTag
removes a tag of a repository by the given tag name.
Syntax |
RemoveTag($FileOrDirectory, $Tag, $hCVSOptions, $hCommandOptions); |
Input |
|
SymbolicNames
Returns the symbolic names and revision numbers of an file at repository.
Syntax |
$hNames = SymbolicNames($RemoteFileName, $hCVSOptions); |
Input |
|
Return |
|
SymbolicNamesByOutput
Returns the symbolic names and revision numbers, see SymbolicNames
Syntax |
$hNames = SymbolicNamesByOutput($aLogOut); |
Example |
my $out_log = CVSCommand('rlog', [$File], $hCVSOptions, undef, {'outlines' => 1}); my $hNames = SymbolicNamesByOutput($out_log->{'outlines'}); |
Input |
|
Return |
|
add
Adds a file or directory to CVS. Directories can be added recursively.
Syntax |
$CVS->add($FileOrDirectory, $hOptions); $CVS->add('DE_EPAGES/Core', { recursive => 1 }); |
Input |
|
command
Executes a CVS command
Syntax |
$hOut = $CVS->command($Command, $aCommandOptions, $aArguments); $hOut = $CVS->command($Command, $hCommandOptions, $aArguments, $hCVSOptions, $hOptions); $hOut = $CVS->command($Command, $aCommandOptions, $aArguments, $hCVSOptions, $hOptions); |
Example |
$hOut = $CVS->command('add', { '-k' => 'b' }, ['test.pl'], { '-q' => '' }, {'print' => 1}); $hOut = $CVS->command('tag', ['-F'], ['release_x_y', 'test.pl'], { '-q' => '' }); |
Input |
|
Return |
|
getDiffFiles
Returns the files that differ betweewn 2 revisions.
Syntax |
$aFileNames = $CVS->getDiffFiles($Module, $OldRevision, $NewRevision); $aFileNames = $CVS->getDiffFiles($Module, $OldRevision, $NewRevision, $hOptions); |
Example |
$aFileNames = $CVS->getDiffFiles('RND/epages/epages5', 'release_5_0_1', 'release_5_0_2'); |
Input |
|
Return |
|
new
Createa a CVS object.
Syntax |
$CVS = DE_EPAGES::Core::API::CVS->new($hCVSOptions, $hOptions); |
Example |
$CVS = DE_EPAGES::Core::API::CVS->new({ -q => '' }, { 'print' => 1 }); |
Input |
|