Contents

Class P4DepotFile < Object require "P4"

Description

Utility class providing easy access to the attributes of a file in a Perforce depot. Currently only P4#run_filelog returns an array of P4DepotFile objects. Each P4DepotFile object contains summary information about the file, and a list of revisions (P4Revision objects) of that file.

Class Methods

new   P4DepotFile.new( aString ) -> aP4DepotFile
Constructs a new P4DepotFile object for the named depot file.

Instance Methods

depot_file   df.depot_file -> aString
Returns the name of the depot file this object refers to.
each_revision   df.each_revision { |rev| block } -> revArray
Iterates over each revision of the depot file
head_action   df.head_action -> aString
Returns the name of the action that gave rise to the head revision.
head_action=   df.head_action = aString -> aString
Set the name of the action that gave rise to the head revision.
head_change   df.head_change -> aNumber
Get the number of the change that gave rise to the head revision.
head_change=   df.head_change = aNumber -> aNumber
Set the number of the change that gave rise to the head revision.
head_rev   df.head_rev -> aNumber
Returns the revision number of the head revision.
head_rev=   df.head_rev = aNumber -> aNumber
Set the number of the head revision.
head_time   df.head_time -> aTime
Returns the time that the head revision was created.
head_time=   df.head_time = aTime -> aTime
Set the time that the head revision was created.
head_type   df.head_type -> aString
Returns the Perforce type of the head revision.
head_type=   df.head_type = aString -> aString
Sets the type of the head revision.
new_revision   df.new_revision -> aP4Revision
Creates a new (empty) P4Revision object and adds it to the list of revisions of the depot file. Returns the newly created P4Revision object so that you can populate it.
revisions   df.revisions -> aArray
Returns an array of revisions of the depot file

See Also

P4 P4Exception P4Integration P4Revision P4::Spec