Creates an instance, see subclasses for options.
|fields||Returns a list of field names, with @ prepended to any array fields.|
|serialize||Converts the revision metadata to a set of name=value strings suitable for emitting to a flat file for later recovery. Names are included so that new revisions of VCP can rescuscitate revisions.|
VCP::Rev->split_id( $id );
Splits an id in to chunks on punctuation and number/letter boundaries.
This oddness is to facilitate manually named revisions that use a lettering scheme. Note that the sort algorithms make an assumption that 1.0a is after 1.0. This prevents kind of naming like 1.2pre1.
splits $id1 and $id2 if necessary and compares them using <=> on even numbered elements and cmp on odd numbered elements.
Returns TRUE if this is a base revision. This is the case if no action
is defined. A base revision is a revision that is being transferred
merely to check its contents against the destination repositorys
contents. Base revisions contain no action and contain a <digest> but no
<delta> or <content>.
When a VCP::Dest::* receives a base revision, the actual body of the revision is backfilled from the destination repository and checked against the digest. This cuts down on transfer size, since the full body of the file never need be sent with incremental updates.
See backfill in VCP::Dest as well.
|is_real_rev||Returns true for base revisions and for add or edit revisions, all of which must be able to be checked out from the source repository.|
Returns TRUE if this is a branch or clone revision. Placeholder revisions
are used to record branch points without causing edits and to perform
Note that placeholders may have rev_id and change_id fields, but they are likely to be fabricated as they often dont actually exist in the source repository. For instance, CVS does not record a revision number for a branch operation unless the file has been alterde on the branch.
Returns TRUE if this is a branch founding placeholder revision.
These revisions are used to record branch points for files without
modifying the files.
A branch revision has an action of branch.
Note that branch placeholders may have rev_id and change_id fields, but they may be malformed; they are present for sorting purposes only and should be ignored by the destination repository.
Branch revisions may not be present for branches which have files on them but should be in order to cause the destination to create the branch before altering any files on it.
|is_clone_rev||Returns TRUE if this is a cloning placeholder revision. These revisions are used to mirror files from one branch to another when a physical filebranch maps to more than one logical branch. This is not possible in p4, but is possible in both CVS and VSS. CVS generates these as of this writing, VSS may by the time you read this.|
|base_revify||Converts a normal rev in to a base rev.|
|id||Sets/gets the id. Returns $name#$rev_id by default, which should work for most systems.|
|get_source_file||Fetches the file from the source repository and returns a path to that file.|
$r->set_labels( \@labels ) ; ## pass an array ref for speed @labels = $r->labels ;
Sets/gets labels associated with a revision. If a label is applied multiple times, it will only be returned once. This feature means that the automatic label generation code for r_... revision and ch_... change labels wont add additional copies of labels that were already applied to this revision in the source repository.
Returns labels in an unpredictible order, which happens to be sorted for now. This sorting is purely for logging purposes and may disappear at any moment.
$r->add_label( $label ) ;
Marks one or more labels as being associated with this revision of a file.
$r->set_earlier_ids( \@earlier_ids ); ## pass an array ref for speed $r->set_earlier_ids( @earlier_ids ); ## or now @earlier_ids = $r->earlier_ids ;
Sets/gets earlier_ids associated with a revision. If a earlier_id is applied multiple times, it will only be returned once. This feature means that the automatic earlier_id generation code for r_... revision and ch_... change earlier_ids wont add additional copies of earlier_ids that were already applied to this revision in the source repository.
Returns earlier_ids in an unpredictible order, which happens to be sorted for now. This sorting is purely for logging purposes and may disappear at any moment.
$r->add_earlier_id( $earlier_id ) ;
Marks one or more earlier_ids as being associated with this revision of a file.
VCP::Rev::iso8601format( $time );
Takes a seconds-since-the-epoch time value and converts it to an ISO8601 formatted date. Exportable:
|as_string||Prints out a string representation of the name, rev_id, change_id, type, time, and a bit of the comment. base revisions are flagged as such (and dont have fields like time and comment).|
This class uses the fields pragma, so youll need to use base and possibly fields in any subclasses.
Copyright 2000, Perforce Software, Inc. All Rights Reserved.
Barrie Slaymaker <firstname.lastname@example.org>
|perl v5.20.3||VCP::REV (3)||2004-11-04|