Rechercher une page de manuel
VCS::LibCVS::FileRevision.3pm
Langue: en
Version: 2005-10-10 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
VCS::LibCVS::FileRevision - A specific revision of a file managed by CVS.SYNOPSIS
DESCRIPTION
Represents a single revision of a file managed by CVS.CLASS ROUTINES
new()
$file_rev = VCS::LibCVS::FileRevision->new($file, $revision, $branch_rev)- return type: VCS::LibCVS::FileRevision
- argument 1 type: VCS::LibCVS::RepositoryFile
- argument 2 type: VCS::LibCVS::Datum::RevisionNumber
- argument 3 type: optional VCS::LibCVS::Datum::RevisionNumber
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.
INSTANCE ROUTINES
get_revision_number()
$file = $file_rev->get_revision_number()- return type: VCS::LibCVS::Datum::RevisionNumber
get_file()
$file = $file_rev->get_file()- return type: VCS::LibCVS::RepositoryFile
get_file_branch()
$file_branch = $file_rev->get_branch()- return type: VCS::LibCVS::FileBranch
get_log_message()
$message = $file_rev->get_log_message()- return type: scalar string
Returns the text of the log message for the commit that resulted in this revision.
get_committer()
$committer = $file_rev->get_committer()- return type: scalar string
Returns the logname of whoever committed this particular revision.
get_time()
$time = $file_rev->get_time()- return type: scalar number
Returns the time that this particular revision was committed, as seconds since midnight January 1 1970.
get_time_string()
$time_str = $file_rev->get_time_string()- return type: scalar string
Returns the time that this particular revision was committed, as the formatted string returned by CVS.
is_dead()
if ($file_rev->is_dead()) { . . .- return type: scalar boolean
Returns true if and only if this revision is marked dead.
get_contents()
$data = $file_rev->get_contents()- return type: VCS::LibCVS::Datum::FileContents
Returns the contents of the particular revision.
get_predecessor()
$pre_file_rev = $file_rev->get_predecessor()- return type: VCS::LibCVS::FileRevision
Returns the file revision that was right before this one, it's youngest ancestor. Return undef if it has no predecessor.
get_successor()
$next_file_rev = $file_rev->get_successor()- return type: VCS::LibCVS::FileRevision
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.
compare()
$cmp = $file_rev1->compare($file_rev2)- return type: integer, one of VCS::LibCVS::Datum::RevisionNumber::COMPARE_*
- argument 1 type: VCS::LibCVS::FileRevision
Compares this file revision with the argument.
The meanings of the return values are:
- COMPARE_EQUAL
- They are the same revision.
- COMPARE_ANCESTOR
- The argument is an ancestor of this.
- COMPARE_DESCENDANT
- The argument is a descendant of this.
- COMPARE_INCOMPARABLE
- 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.
equals()
if ($frev1->equals($frev2)) {- return type: boolean
- argument 1 type: VCS::LibCVS::FileRevision
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.
SEE ALSO
VCS::LibCVS
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre