Package DE_EPAGES::Installer::API::CVSTagHandler
Collection of utility functions for tag process. Will be moved to git.
Base |
DE_EPAGES::Core::API::CVS |
Functions
- checkout
- commit
- contentChanged
- continuousUpdateTags
- deleteRevisions
- existsTagOnFile
- export
- getAllReleaseTags
- getChangedFiles
- getChangedFilesWithChangedContent
- getChangedFilesWithUnchangedContent
- getCommentForRevision
- getInfoForTag
- getLatestCorrespondingHotFixTag
- getLatestReleaseTag
- getMergeRevisions
- getOnlyHotFixMergeRevisions
- getPreviousRevision
- getRevision
- getRevisionDiff
- getRevisionDifffAsHash
- getRevisionRdiff
- inspectionAffectedFile
- isDirectSuccessor
- new
- patchAffectedFile
- removeTag
- removeTagByServer
- sendInspectionFileMail
- sendMergeMail
- sendPatchFileMail
- setTag
- setTagByServer
- updateChanges
- updateFile
- updatePatchTag
- updateReleaseTag
checkout
executes cvs checkout on cvsfile, using branch or revision to target directory
Syntax |
$CVSTagHandler->checkout( $CVSFile, $BranchOrRevision, $TargetDirectory ); |
Input |
|
Return |
|
commit
commit passed file to cvs with passed comment
Syntax |
$CVSTagHandler->commit( $Comment, $TargetFileName ); |
Input |
|
Return |
|
contentChanged
returns true if the content changed between revisions tagged with specific tags
Syntax |
$ContentChanged = $CVSTagHandler->contentChanged( $File, $StartTag, $EndTag ); |
Input |
|
Return |
|
continuousUpdateTags
update the patch tag for files where content changed between release tags, the release tag have to be already updated Optional Parameter:
- verbose - show messages - bool
- return_patch_affected_files - return a list of affected files - bool
Syntax |
$Handler->continuousUpdateTags( $ReleaseOld, $ReleaseNew, $PatchNew, $hOptions ); $aAffectedFiles = $Handler->continuousUpdateTags( $ReleaseOld, $ReleaseNew, $PatchNew, { return_patch_affected_files => 1, }); |
Example |
$Handler->continuousUpdateTags( 'release_6_12_0', 'release_6_12_1', 'patch_6_12_1', 'B_deployment_6_12_1', { 'verbose' => 1 } ); |
Input |
|
Return |
|
deleteRevisions
delete all revisions from start revision to end revision, inclusive, on the same branch handle with care
Syntax |
$CVSTagHandler->deleteRevisions( $StartRevision, $EndRevision, $TargetFileName ); |
Input |
|
Return |
|
existsTagOnFile
return true if tag exists on file
Syntax |
$TagExists = $CVSTagHandler->existsTagOnFile($File,$Tag); |
Input |
|
Return |
|
export
executes cvs export on cvsfile, using branch or revision to target directory
Syntax |
$CVSTagHandler->export( $CVSFile, $BranchOrRevision, $TargetDirectory ); |
Input |
|
Return |
|
getAllReleaseTags
returns all release tags from file
Syntax |
$aReleaseTags = $CVSTagHandler->getAllReleaseTags( $File ); |
Input |
|
Return |
|
getChangedFiles
return the list of files that are taggt and have changed revision Optional Parameter:
- cvsdirectory - cvs directory where rdiff called, default = 'RND/epages/epages5/AllOS/Cartridges'
- verbose - flag to print messages
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 |
|
Return |
|
getChangedFilesWithChangedContent
return the list of files that are taggt and have changed revisions and changed content Optional Parameter:
- cvsdirectory - cvs directory where rdiff called, default = 'RND/epages/epages5/AllOS/Cartridges'
- verbose -
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 |
|
Return |
|
getChangedFilesWithUnchangedContent
return the list of files that are taggt and have changed revisions but identical content Optional Parameter:
- cvsdirectory - cvs directory where rdiff called, default = 'RND/epages/epages5/AllOS/Cartridges'
- verbose -
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 |
|
Return |
|
getCommentForRevision
returns the comment of the revision from file
Syntax |
$Comment = $CVSTagHandler->getCommentForRevision( $File, $Revision ); |
Input |
|
Return |
|
getInfoForTag
returns the name of the engineer that checked in the file tagged with specific tag
Syntax |
$EngineerName = $CVSTagHandler->getInfoForTag( $File, $Tag ); |
Input |
|
Return |
|
getLatestCorrespondingHotFixTag
returns the highest hot fix tag of the file tagged with specific tag
Syntax |
$HotFixTag = $CVSTagHandler->getLatestCorrespondingHotFixTag( $File, $Tag ); |
Input |
|
Return |
|
getLatestReleaseTag
returns the highest release Tag from file
Syntax |
$ReleaseTag = $CVSTagHandler->getLatestReleaseTag( $File ); |
Input |
|
Return |
|
getMergeRevisions
returns the revisions to be merged
Syntax |
$CVSTagHandler->getMergeRevisions( $aRevisions ); |
Input |
|
Return |
|
getOnlyHotFixMergeRevisions
returns the revisions to be merged
Syntax |
$CVSTagHandler->getOnlyHotFixMergeRevisions( $File, $aRevisions ); |
Input |
|
Return |
|
getPreviousRevision
returns the predecessor of passed revision
Syntax |
$CVSTagHandler->getPreviousRevision( $Rev ); |
Input |
|
Return |
|
getRevision
returns the revision of the file tagged with specific tag
Syntax |
$Revision = $CVSTagHandler->getRevision( $File, $Tag ); |
Input |
|
Return |
|
getRevisionDiff
executes cvs diff command
Syntax |
$CVSTagHandler->getRevisionDiff( $StartRevision, $EndRevision, $TargetFileName ); |
Input |
|
Return |
|
getRevisionDifffAsHash
executes cvs diff command and transforms result in hash
Syntax |
$CVSTagHandler->getRevisionDifffAsHash( $StartRevision, $EndRevision, $TargetFileName ); |
Input |
|
Return |
|
getRevisionRdiff
executes cvs rdiff command
Syntax |
$CVSTagHandler->getRevisionRdiff( $StartRevision, $EndRevision, $CVSFile ); |
Input |
|
Return |
|
inspectionAffectedFile
return true if the file is inspection relevant
Syntax |
$FileIsAffectedByInspection=$Handler->inspectionAffectedFile( $FilePath ); |
Example |
if ($Handler->inspectionAffectedFile('RND/epages/epages5/AllOS/Cartridges/DE_EPAGES/Object/API/Cartridge.pm')){ ... }; |
Input |
|
Return |
|
isDirectSuccessor
returns true if the second revision is direct successor of first revision
Syntax |
$CVSTagHandler->isDirectSuccessor( $Rev1, $Rev2 ); |
Input |
|
Return |
|
new
Creates a new tag handler object
Syntax |
$TagHandler = DE_EPAGES::Installer::API::CVSTagHandler->new( 'verbose' => 1 ); |
Input |
|
Return |
|
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 |
|
Return |
|
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 |
|
Return |
|
removeTagByServer
remove a tag from file, using server command (rtag)
Syntax |
$Handler->removeTagByServer($Tag, $Path); |
Example |
my $Message = $Handler->removeTagByServer( 'patch_6_12_1', 'RND/epages/epages5' ); |
Input |
|
Return |
|
sendInspectionFileMail
send an info Mail to the inspection engineer
Syntax |
$Handler->sendInspectionFileMail( $Tag, $MailAddress, $aChangedFiles, $aDeletedFiles, $aPatchFiles, $aManuelSetReleaseFiles ); |
Example |
$Handler->sendPatchFileMail( 'patch_6_13_0', 'patch@epages.com' \@ChangedFiles, \@DeletedFiles, \@PatchFiles, \@ManualSetReleaseFiles \@ManualSetPatchFiles ); |
Input |
|
sendMergeMail
sends merge mail to adresses in mail adress array
Syntax |
$CVSTagHandler->sendMergeMail( $aMailAddress, $Message, $EPG, $ahFiles ); |
Input |
|
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 |
|
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 |
|
Return |
|
setTagByServer
set a tag on file, using server command (rtag)
Syntax |
$Handler->setTagByServer($Tag, $TagOrBranch, $Path); |
Example |
my $Message = $Handler->setTagByServer( 'patch_6_12_1', 'HEAD', 'RND/epages/epages5' ); |
Input |
|
Return |
|
updateChanges
update changes from start revision to end revision
Syntax |
$CVSTagHandler->updateChanges( $StartRevision, $EndRevision, $TargetFileName ); |
Input |
|
Return |
|
updateFile
Synchronizes file on hard disk with CVS repository.
Syntax |
$CVSTagHandler->updateFile($FileName, $Tag); |
Input |
|
Return |
|
updatePatchTag
update the patch tag for files where content changed between release tags, the release tag have to be already updated Optional Parameter:
- cvsdirectory - cvs directory where rdiff called, default = 'RND/epages/epages5/AllOS'
- verbose - show messages
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 |
|
updateReleaseTag
update the release tag Optional Parameter:
- updatepatchtag - cvs directory where rdiff called, default = 'RND/epages/epages5/AllOS'
- verbose - show messages
Syntax |
$Handler->updateReleaseTag( $ReleaseNew, $BranchOrTag, $hOptions ); |
Example |
$Handler->updateReleaseTag( 'release_6_12_1', 'B_deployment_6_12_1', { 'verbose' => 1 } ); $Handler->updateReleaseTag( 'test_release_6_17_4', 'new_deploy_test', { 'verbose' => 1 } ); |
Input |
|