Changes between Initial Version and Version 1 of RevtreePlugin/LogEnhancer


Ignore:
Timestamp:
Dec 17, 2006, 2:53:10 PM (17 years ago)
Author:
Emmanuel Blot
Comment:

Creation

Legend:

Unmodified
Added
Removed
Modified
  • RevtreePlugin/LogEnhancer

    v1 v1  
     1= RevtreePlugin enhancer based on log messages =
     2
     3== Description ==
     4
     5!LogEnhancer is as plugin for the RevtreePlugin: it recognizes some keywords
     6in the repository log messages to represent operations between branches.
     7
     8== Overview ==
     9
     10The plugin has been developed for our team, and is therefore dedicated to the
     11way we work with Subversion. It is delivered as a plugin, as there are few
     12chances that you manage the files in your repository as we do.
     13
     14Nevertheless, the plugin can be used as a code base to write your own enhancer
     15plugins and it demonstrates how to interface your own plugin with the
     16RevtreePlugin.[[BR]]
     17You can also refer to the '!SimpleEnhancer' plugin that comes
     18with the RevtreePlugin code (see
     19[browser:/revtreeplugin/0.10/revtree/enhancer.py enhancer.py]).
     20
     21== Log message description ==
     22
     23We are using a log message format convention to work with our repository:
     24Any change made to the repository (''copy'', ''move'', ''commit'',
     25''delete'') should be documented within the log message.[[BR]]
     26Using the log message to document any change allows the developer to use his
     27SVN client of choice (TortoiseSVN, svn CLI, ...) with no trouble.
     28
     29The log message format is heavily inspired from the Trac hook scripts as they
     30have been initially provided along with Trac (see
     31[t:browser:/branches/0.10-stable/contrib /contrib]) and a little bit enforced:
     32 1. A log message should always start with a keyword that describes the
     33    kind of modification that is to be commited to the repository
     34 1. There could be only one kind of modification per commit operation
     35     * As an example, a developer is not allowed to create and delete a branch
     36       within the same changeset
     37 1. In all log messages, free text is always allowed after the initial keyword
     38    (and the mandatory options if any)
     39   
     40To the initially contributed keywords:
     41 * '''refs #t''': used when a changeset is tied to an open ticket `t`
     42 * '''closes #t''': used when a changeset implements a feature that is tied to
     43   an open ticket `t`
     44 * '''fixes #t''': used when a changeset fixes a bug that is described in a
     45   open ticket `t`
     46we have added a bunch of new keywords:
     47 * '''creates''': used when a developer creates a new development branch or
     48   creates a ''tag'' branch.
     49 * '''terminates''': used when a developer deletes an existing branch
     50 * '''imports''': used when a developer imports files from an external source
     51   (a Clearcase server in our team)
     52 * '''delivers [x]:[y]''': used when a developer delivers a development branch
     53   to another branch - usually to the trunk. `[x]:[y]` represents the first
     54   (`x`) and last (`y`) changeset on the source branch that are actually
     55   delivered.[[BR]]
     56   If a single changeset is delivered, the log message can be simplified as
     57   '''delivers [x]'''
     58 * '''admins''' allows the repository administrator(s) to force any kind of
     59   operations which would normally be rejected by the hook scripts
     60
     61The !LogEnhancer recognizes and uses the following keywords:
     62 * '''creates''': the !LogEnhancer uses this keyword to create a ''branch''
     63   operation (from the source branch to the new branch). !LogEnhancer uses the
     64   repository path information to locate the source and the origin
     65   changeset.[[BR]]
     66   The operation is rendered as an arrow-headed spline that runs from
     67   the source changeset to the destination changeset.[[BR]]
     68   Moreover, the appearance of the destination changeset (''i.e.'' the first
     69   changeset of the newly created branch) is tweaked to signal it is the
     70   initial branch changeset: stroke and fill color are swapped
     71 * '''delivers [x]:[y]''': the !LogEnhancer uses this keyword to create a
     72   ''merge'' operation. As the SVN repository is not able to track merge
     73   operations, the !LogEnhancer needs the `x` and `y` changeset numbers to
     74   retrieve the source of the merge operation (and the source branch)[[BR]]
     75   The operation is rendered as an arrow-headed spline that runs from the
     76   youngest changeset (`y`) of the source to the destination changeset.[[BR]]
     77   The original changesets are also outlined with a rounded rectangle that
     78   represents the span of the source changesets.
     79 * '''imports''': the !LogEnhancer uses this keyword to change the appearance
     80   of the changeset (two short lines are added to the changeset circle)
     81 * '''terminates''': the !LogEnhancer uses this keyword to change the
     82   appearance of the changeset: it is filled with a black background, and the
     83   text is stroked in white color.
     84   
     85The !LogEnhancer makes use of additional information from the SVN repository:
     86it looks for revision properties that our team use to mark some changesets
     87with meta information:
     88 * `st:export` indicates a (trunk) changeset that has been replicated on the
     89   external repository. The !LogEnhancer uses this property to modify the
     90   appearance of the changeset: its shape is changed from a circle to an
     91   hexagonal shape.
     92
     93== Installation ==
     94
     95=== Build the plugin ===
     96
     97As with any other plugin, download the plugin code, and build a plugin egg
     98file. The !LogEnhancer plugin source code comes with the RevtreePlugin (see
     99RevtreePlugin#Installation), but is not built within the RevtreePlugin egg.
     100
     101To build the !LogEnhancer plugin, change the current directory to the
     102`enhancers` and build the egg file:
     103{{{
     104$ cd revtreeplugin/0.10/enhancers
     105$ python setup.py bdist_egg
     106}}}
     107then copy the egg file to the global plugin directory or the project plugin
     108directory
     109
     110=== Enable the plugin ===
     111
     112From the [t:wiki:WebAdmin WebAdmin] plugin interface or from your `trac.ini`
     113file, enable the !LogEnhancer plugin.[[BR]]
     114The !LogEnhancer plugin appears as `revtree.logenhancer` in the plugin list.
     115
     116As you have probably enabled all the revtree features with
     117{{{
     118[components]
     119revtree.* = enabled
     120}}}
     121when you installed the RevtreePlugin, the !LogEnhancer plugin will be loaded
     122along with the RevtreePlugin.
     123
     124Nevertheless, the !LogEnhancer plugin superseeds the default !SimpleEnhancer
     125plugin that is self-contained in the RevtreePlugin. To avoid duplicating
     126''creation'' operation rendering, you want to disable the default plugin:
     127{{{
     128[components]
     129revtree.* = enabled
     130revtree.enhancer = disabled
     131revtree.enhancer.simpleenhancer = disabled
     132}}}
     133
     134You can perform the same operations from the [t:wiki:WebAdmin WebAdmin]
     135interface.
     136
     137== Author/Contributors ==
     138 * '''Author''' [wiki:eblot]