NAME
VcsTools::Version - Perl class to manage VCS revision.
SYNOPSIS
No synopsis given. This object is better used with the History module.
DESCRIPTION
This class represents one version of a VCS file. It holds all the information relevant to this version including the log of this version, the parent revision, child revision and do on.
Its main function is to deal with the History object and its Graph Manager object to draw the history revision tree in the Graph contained by the History object. The Version object will perform all necessary calls to the drawing methods of GraphMgr to get the correct drawing.
It can also interact with other Version object (with the help the History object) to known who is the ancestor of 2 revisions numbers, or if this revision number is a child or parent of it.
The information structure stored in each Version object are described in the dataFormat HASH reference passed to the constructor (See VcsTools::DataSpec::HpTnd(3) for more details).
All these information can be stored in a database. See Puppet::Any(3) for more details.
WIDGET USAGE
Well, By itself, the Version widget cannot do much. The only function available is to edit the history through the "File->edit history" menu.
Future version may be better depending on user inputs.
Constructor
new('name'=> '...', ...)
Parameters are :
revision : revision number of this version
manager : VcsTools::History object reference
dataFormat : data format HASH reference.
Methods
display()
Will launch a widget for this object.
drawTree()
Will start drawing a tree (from the revision of this Version object) calling History object's graph manager.
drawSubTree(x, y, width_reference)
Called recursively to draw all nodes, internal method.
x,y are the coordinates of the root of the sub-tree. The width will be changed to the actual width (in pixels) of the sub-tree. Note that the width of the sub-tree depends on the number of branches.
storeLog(log_reference)
This methods takes a hash reference containing all informations extracted from the VCS log of this version. Then all other complementary informations (such as upper revision, branches revisions, revision that were eventually merged in this one) are computed and stored in the database.
editHistory(...)
Will launch a VcsTools::HistEdit widget for this version. All parameters will be passes as is to the archiveHistory() method.
archiveHistory(info_hash_ref)
Will call VcsTools::History() archiveHistory method. info_hash contains all the information to be archived in the VCS archive system.
getRevision()
Returns the revision number of this object.
getUpperRev()
Returns the revision number of the "parent" of this object.
getSubLog()
Returns the log of this version object.
getInfoRef()
Returns the hash ref containing all version informations.
hasParent()
Returns true if this version has a "parent" object.
findAncestor(other_revision_number)
Returns the ancestor number of this revision and the other.
Returns undef in case of problems.
AUTHOR
Dominique Dumont, Dominique_Dumont@grenoble.hp.com
Copyright (c) 1998 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1), Tk(3), Puppet::Any(3), VcsTools::DataSpec::HpTnd(3), VcsTools::History(3)