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

NAME

Puppet::VcsTools::History - TK GUI for VcsTools::History

SYNOPSIS

 require VcsTools::DataSpec::HpTnd ; # for instance
 # could be VcsTools::DataSpec::Rcs

 my $ds = new VcsTools::DataSpec::HpTnd ; # ditto

 my $hist = new Puppet::VcsTools::History 
  (
   dbHash => \%dbhash,         # for permanent data storage
   keyRoot => 'history root',  # key for permanent data storage
   'topTk' => $mw,
   name => 'Foo history',
   dataScanner => $ds          # log analyser
  );

DESCRIPTION

This class provides a GUI to the VcsTools::History class.

It contains a GraphWidget to draw the history tree and some key bindings to read the log informations from the tree drawing .

WIDGET USAGE

The display of the history object is made of :

  • A canvas to draw a revision tree.

  • A revision list. If you double click on a revision of this list, History will draw the revision tree starting from this revision.

  • A text window to display informations related to the revision tree.

Nodes

Each rectangle in the tree represent a revision (aka a node). The text in the rectangle is bound to some keys :

  • button-1 selects the node for further operation (See below)

  • button-3 pops-up a menu

  • double button-1 redraws the tree from this revision

The node popup menu features :

  • draw from here: Re-draws the tree from this revision

  • open version object: Opens the display of the Puppet::VcsTools::Version object.

Arrows

Each arrow is bound to some keys :

  • button-1 shows the log of this revision

  • button-3 pops up a menu

The arrow popup menu features :

  • show log: shows the log of this revision

  • show full log: shows the full log of this revision with all fields.

global features

The graph widget features a global menu invoked on the title of the graph widget. It features :

  • unselect all: unselect all nodes.

  • reload from archive: Reloads information from the VCS archive. This will also update your local information data base. Use this menu when other people have worked on your VCS files.

  • show cumulated log: Will show a concatenation of logs between 2 selected revisions. One of this revision must be the ancestor of the other.

The VcsTools::File(3) object have also some bindings (See "WIDGET USAGE" in VcsTools::File)

Constructor

new(...)

Will create a new history object.

Parameters are:

  • All parameter of "Constructor" in Puppet::Body

  • dataScanner : VcsTools::DataSpec::HpTnd (or equivalent) object reference

  • topTk: the ref of the Tk main window

Methods

All "Methods" in VcsTools::History plus these ones:

addNewVersion(...)

The call will be delegated to "addNewVersion(...)" in VcsTools::History, then the drawing will be updated with it.

display()

Will launch a widget for this object.

closeDisplay()

Delegated to the "closeDisplay" in Puppet::Body method.

drawTree(...)

Parameters are:

  • revision: The tree will start from this revision number. Optional. If not passed the tree will be re-drawn from the revision that was passed the previous time this funcion was called.

  • nodeId: same as revision.

getTreeGraph()

Returns the Tk::TreeGraph ref embedded in History display or undef if the display was not opened.

getInfoWidget()

Returns the Tk::ROText ref embedded in History display or undef if the display was not opened.

TODO

Trigger a history update if the database time stamp is younger than the time of the last history analysis

AUTHOR

Dominique Dumont, Dominique_Dumont@grenoble.hp.com

Copyright (c) 1998-1999 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::Show(3), VcsTools::DataSpec::HpTnd(3), Puppet::VcsTools::Version(3), Puppet::VcsTools::File(3)