ePages 6.13.2 - DE_EPAGES/Installer/API/CVSTagHandler.pm

Package DE_EPAGES::Installer::API::CVSTagHandler

Collection of utility functions for tag process

Base
DE_EPAGES::Core::API::CVS

Functions

contentChanged
getChangedFiles
getChangedFilesWithChangedContent
getChangedFilesWithUnchangedContent
getEngineerForTag
getRevision
patchAffectedFile
removeTag
sendPatchFileMail
setTag
updatePatchTag
updateReleaseTag

contentChanged

returns true if the content changed between revisions tagged with specific tags

Syntax
$ContentChanged = $CVSTagHandler->contentChanged( $File, $StartTag, $EndTag );
Input
$File (String)
cvs path of file
$StartTag (String)
first tag
$EndTag (String)
second tag
Return
$ContentChanged (bool)
true if content of file changed between tags

getChangedFiles

return the list of files that are taggt and have changed revision Optional Parameter:

Syntax
$Handler->getChangedFiles( $StartTag, $EndTag, %hOptions );
Example
my $aList = $Handler->getChangedFiles(
    'release_6_11_3',
    'patch_6_12_0',
    {'cvsdirectory' => 'RND/epages/epages5/AllOS/Cartridges/Presentation'}
);
Input
$StartTag (String)
first tag
$EndTag (String)
second tag
%hOptions (ref.hash.string)
keys
  • cvspath - repository URL (directory only) - string
  • verbose - flag to print messages - string/bool
Return
$aChangedFiles (ref.array.String)
list of path's from files that changed

getChangedFilesWithChangedContent

return the list of files that are taggt and have changed revisions and changed content Optional Parameter:

Syntax
$Handler->getChangedFilesWithChangedContent( $StartTag, $EndTag, %hOptions );
Example
my $aList = $Handler->getFileListUnchangedContent(
    'release_6_11_3',
    'patch_6_12_0',
    {'cvsdirectory' => 'RND/epages/epages5/AllOS/Cartridges/Presentation'}
 );
Input
$StartTag (String)
first tag
$EndTag (String)
second tag
%hOptions (ref.hash.string)
keys
  • cvspath - repository URL (directory only) - string
  • verbose - flag to print messages - string/bool
Return
$aChangedFiles (ref.array.String)
list of path's from files that changed

getChangedFilesWithUnchangedContent

return the list of files that are taggt and have changed revisions but identical content Optional Parameter:

Syntax
$Handler->getChangedFilesWithUnchangedContent( $StartTag, $EndTag, %hOptions );
Example
my $aList = $Handler->getFileListUnchangedContent(
    'release_6_11_3',
    'patch_6_12_0',
    {'cvsdirectory' => 'RND/epages/epages5/AllOS/Cartridges/Presentation'}
 );
Input
$StartTag (String)
first tag
$EndTag (String)
second tag
%hOptions (ref.hash.string)
keys
  • cvspath - repository URL (directory only) - string
  • verbose - flag to print messages - string/bool
Return
$aChangedFiles (ref.array.String)
list of path's from files that changed

getEngineerForTag

returns the name of the engineer that checked in the file tagged with specific tag

Syntax
$EngineerName = $CVSTagHandler->getEngineerForTag( $File, $Tag );
Input
$File (String)
cvs path of file
$Tag (String)
tag of file
Return
$EngineerName (string)
name of the engineer who checkt in the file

getRevision

returns the revision of the file tagged with specific tag

Syntax
$Revision = $CVSTagHandler->getRevision( $File, $Tag );
Input
$File (String)
cvs path of file
$Tag (String)
tag of file
Return
$Revision (string)
revision of the file tagged with specific tag

patchAffectedFile

return true if the file is patch relevant

Syntax
$FileIsAffectedByPatch=$Handler->patchAffectedFile( $FilePath );
Example
if ($Handler->patchAffectedFile('RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Object/API/Cartridge.pm')){
    ...
};
Input
$FilePath (String)
path from a specific file
Return
$FileIsAffected (boolean)
returns true if file have an affect on the patch

removeTag

remove a tag from file

Syntax
$Handler->removeTag( $File, $Tag );
Example
my $Message = $Handler->removeTag(
    'RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Object/API/SQLCompare.pm',
    'patch_6_12_1',
);
Input
$File (String)
cvs path of file
$Tag (String)
tag to remove
Return
$Message (String)
message for remove tag

sendPatchFileMail

send an Info Mail to the patch building engineer

Syntax
$Handler->sendPatchFileMail( $Tag, $MailAddress, $aChangedFiles, $aDeletedFiles );
Example
$Handler->sendPatchFileMail(
    'patch_6_13_0',
    'patch@epages.com'
    \@ChangedFiles,
    \@DeletedFiles
 );
Input
$Tag (String)
tag
$MailAddress (String)
mail address
$aChangedFiles (ref.array)
list of changed files
$aDeletedFiles (ref.array)
list of deleted files

setTag

set a tag on file

Syntax
$Handler->setTag( $File, $TargetTagOrRevision, $Tag );
Example
my $Message = $Handler->setTag(
    'RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Object/API/SQLCompare.pm',
    'release_6_12_2',
    'patch_6_12_2'
);
my $Message = $Handler->setTag(
    'RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Object/API/SQLCompare.pm',
    '1.2.43.2',
    'patch_6_12_2'
);
Input
$File (String)
cvs path of file
$TargetTagOrRevision (String)
name of tag or revision number
$Tag (String)
tag to set
Return
$Message (String)
message for remove tag

updatePatchTag

update the patch tag for files where content changed between release tags, the release tag have to be already updated Optional Parameter:

Syntax
updatePatchTag( $ReleaseOld, $ReleaseNew, $PatchNew, $hOptions );
Example
$Handler->updatePatchTag(
    'release_6_12_0',
    'release_6_12_1',
    'patch_6_12_1',
    {
        'cvsdirectory' => 'RND/epages/epages5/AllOS/Cartridges/Presentation',
        'verbose' => 1
    }
 );
Input
$ReleaseOld (String)
old release tag
$ReleaseNew (String)
new release tag
$ReleaseNew (String)
new patch tag to be set
%hOptions (ref.hash.string)
keys
  • cvspath - repository URL (directory only) - string
  • verbose - flag to print messages - string/bool

updateReleaseTag

update the patch tag for files where content changed between release tags, the release tag have to be already updated Optional Parameter:

Syntax
$Handler->updateReleaseTag( $ReleaseOld, $ReleaseNew, $PatchNew, $hOptions );
Example
$Handler->updateReleaseTag(
    'release_6_12_0',
    'release_6_12_1',
    'patch_6_12_1',
    'B_patch_6_12_1',
    {
        'updatepatchtag' => '1',
        'verbose' => 1
    }
 );
Input
$ReleaseOld (String)
old release tag
$ReleaseNew (String)
new release tag
$ReleaseNew (String)
new patch tag to be set
$BranchTag (String)
tag of Branch
%hOptions (ref.hash.string)
keys
  • updatepatchtag - flag for update the patch tag - string/bool
  • verbose - flag to print messages - string/bool