The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VCS::LibCVS::Datum::Entry - A CVS datum for an RCS Entries Line

SYNOPSIS

  $string = VCS::LibCVS::Datum::Entry->new("/Client.pm/1.14/Mon Dec 16 16:49:16 2002//");

DESCRIPTION

An RCS style Entries Line:

  / NAME / VERSION / CONFLICT / OPTIONS / TAG_OR_DATE

This format is used in two places. The CVS/Entries file, and in data returned by the server. The format can be slightly different in each of these cases.

In particular, the server can return a CONFLICT of "+=" when a new conflict is being reported, but this shouldn't be stored in the Entries file. Instead a proper timestamp should be used.

SUPERCLASS

VCS::LibCVS::Datum

INSTANCE ROUTINES

name()

$entry_name = $entry->name()

return type: scalar string

Returns the name of file to which the entry refers.

get_tag()

$tag = $entry->get_tag()

return type: VCS::LibCVS::Datum::TagSpec

Returns the tagspec for this entry, or undef if there's no tag.

get_revision()

$revision = $entry->get_revision()

return type: VCS::LibCVS::Datum::RevisionNumber

Returns the revision number of this entry

is_file()

if ($entry->is_file()) {

return type: boolean scalar

Returns true if the entry represents a file

is_directory()

if ($entry->is_directory()) {

return type: boolean scalar

Returns true if the entry represents a directory

get_updated_time()

$date = $entry->get_updated_time()

return type: time in seconds since the epoch

Returns the time that this file was last made up-to-date by CVS. This is used for checking if files are modified. If the file modification time is less than or equal to this time, then the file has not been modified.

If the file is the result of a merge, then no date is available, and 0 is returned.

get_conflict_time()

$date = $entry->get_conflict_time()

return type: time in seconds since the epoch

Returns the time that conflict information was inserted into this file by CVS. This is used for checking if conflicts have been resolved. If the file modification time is less than or equal to this time, then the file has unresolved conflicts in it.

If the file did not have conflicts inserted into it, 0 is returned.

If this is a new conflict being reported, and the file has not yet been written to disk, there is no time, so undef is returned. This happens in Entry lines being returned from the server.

is_conflict()

if ( $entry->is_conflict() ) . . .

return type: boolean

Return true if this Entry is for a file with a conflict. This can ba a file on disk with a conflict written into it. Or one being returned from the server.

SEE ALSO

  VCS::LibCVS::Datum