VCS::LibCVS::FileRevision - A specific revision of a file managed by CVS.
Represents a single revision of a file managed by CVS.
$file_rev = VCS::LibCVS::FileRevision->new($file, $revision, $branch_rev)
The revision number of the branch of this revision can be optionally specified. If it's not, its revision number without the last field is used as the branch number. It is needed to correctly determine this revision's successor.
$file = $file_rev->get_revision_number()
$file = $file_rev->get_file()
$file_branch = $file_rev->get_branch()
$message = $file_rev->get_log_message()
Returns the text of the log message for the commit that resulted in this revision.
$committer = $file_rev->get_committer()
Returns the logname of whoever committed this particular revision.
$time = $file_rev->get_time()
Returns the time that this particular revision was committed, as seconds since midnight January 1 1970.
$time_str = $file_rev->get_time_string()
Returns the time that this particular revision was committed, as the formatted string returned by CVS.
if ($file_rev->is_dead()) { . . .
Returns true if and only if this revision is marked dead.
$data = $file_rev->get_contents()
Returns the contents of the particular revision.
$pre_file_rev = $file_rev->get_predecessor()
Returns the file revision that was right before this one, it's youngest ancestor. Return undef if it has no predecessor.
$next_file_rev = $file_rev->get_successor()
Returns the file revision on the same branch that comes right after this one, it's oldest descendant. Return undef if it has no successor.
XXXBUG: If a revision has been deleted, this will break.
$cmp = $file_rev1->compare($file_rev2)
Compares this file revision with the argument.
The meanings of the return values are:
They are the same revision.
The argument is an ancestor of this.
The argument is a descendant of this.
The argument is neither an ancestor, nor a descendant of this, and they aren't equal.
If they are FileRevisions of different files an exception is thrown.
See VCS::LibCVS::Datum::RevisionNumber for more information about the comparison of revisions.
if ($frev1->equals($frev2)) {
Returns true if this and the other FileRevision are the same.
The same revision can be on multiple branches, so the branch it's on is not compared.
VCS::LibCVS
To install VCS::LibCVS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCS::LibCVS
CPAN shell
perl -MCPAN -e shell install VCS::LibCVS
For more information on module installation, please visit the detailed CPAN module installation guide.