|Version 11 (modified by 10 years ago) (diff),|
Revision Graph for the Version Control Browser
Revision Graph for the Version Control Browser
- Revision tree enhancements
- Bugs/Feature Requests
This plugin renders a graphical representation of the repository.
The plugin collects the repository's revisions and rebuilds the branches based the names of the files changed in each revision.
Filters can be used to chose which branches and which revisions are to be displayed.
Each depicted changeset is a clickable item that redirects the browser to the appropriate changeset view.
Whenever the mouse cursor is hovered over a revtree changeset, the browser opens a tool tip box that shows the revision number, the author and the date of the revision along with the wiki-formatted log message.
The plugin also shows branch cloning/tagging operations, and can be extended to render other kinds of operations such as merging.
This plugin creates a graph that show the changesets of the project repository.
The user may select which changesets are to be rendered, based on the several filters:
- The main filters are mutually exclusive:
- changeset range: this filter selects a range of changesets to be rendered
- time range: this filters selects the latest changesets of the
repository, with the following predefined time ranges:
- day, 2 days, 3 days, week, fortnight, month, 2 months, 3 months, year
- Any of the following filters can be combined to the main filter to refine
- branch name: this filter selects a single branch, along with all branches declared as 'trunks'
- author: this filter selects all the branches for which the selected author has be a participant (i.e. has committed at least one changeset)
- terminated branches: this filter allows to discard all branches that have been 'terminated', i.e. deleted
Two kinds of views can be selected:
- compact: in this mode, the revtree graph is kept as compact as possible, as an attempt to make all the changeset visible in the web browser page and thereby minimize the scrolling actions. Changesets are placed along on their branche, irrespectively of the nearby branches.
- timeline: in this mode, the revtree graph maintains a time view of the repository: each changeset can be seen relatively to the other changesets, whichever the changeset branch.
User preference persistence
The plugin stores the user settings (filters) in the user session, so the latest configuration is used whenever the user selects the 'revtree' page.
In some cases, the chosen filters select no changeset hence no revtree graph cannot be rendered. In such an event, a Trac error is displayed with the following message:
Selected filters cannot render a revision tree
User settings are not saved if the filter does not permit to generate a valid revtree graph.
There are a lot of limitations, so read them carefully.
- the RevtreePlugin generates inlined SVG.
- SVG is only supported on modern browsers
- inlined SVG means that the plugin generates XHTML+SVG data, which are only supported by few browsers. Many browsers that support SVG do not accept inlined SVG.
- the RevtreePlugin only works with SVN repositories
- it does not support SVN authz
- it has not been thought with multiple projects per repository in mind, so its support for this kind of configuration is probably weak
- filters do not support multiple selections: one can only select all or one branch, all or one author
See RevtreePlugin/Limitations for a technical 'discussion' about the current limitations.
Any browser that supports inlined SVG should work. However, as it seems that some browsers are not able to cope with this kind of data, the following table sums up what you can expect from your favorite browser:
|OS||Browser||Version||Support||Comments / Issues|
|IE + Adobe||7.0 + 3.03||No||Does not even understand the XHTML+XML MIME type|
|OS X||Camino||1.0.3||Buggy||Changeset text is not shown (blind changesets)|
|3.0a1||Buggy||Issues with fonts (known browser issue w/ SVG)|
|OmniWeb||5.5.1||Weak||Changeset text sometimes disappears and info tips are not shown|
|Safari||2.0.4||No||Does not support SVG (needs Safari 3.x)|
|Webkit||r18244||Ok||Minor issue with changeset info tip|
|Linux||Epiphany||2.14.3||Ok||Gnome Web Browser Gecko/1.8|
|Konqueror||3.5.5||No||The revision tree is not shown (inlined SVG does not seem to be supported)|
|Opera||9.10||Ok||Build 521 (Qt 3.3.7)|
The browser compatibility matrix has been tested against RevtreePlugin 0.4.5
Get the plugin source code
Download the zipped source from [download:revtreeplugin here].
Build the plugin
As with any other plugin:
python setup.py bdist_egg
Installation of the plugin
Copy the generated egg file (from the
dist/ directory) to your project
plugin directory, or in the global plugin directory if you want to use it for
several Trac projects
Enabling the plugin
From the WebAdmin plugin interface or from your trac.ini file, enable the RevtreePlugin.
trac.ini, edit the components section to add the revtree entry as follows:
[components] revtree.* = enabled
Revtree plugin can be configured with the help of the following settings:
- Mandatory parameters defined in the Trac section
[trac] # SVN repositories only repository_type = svn # Base URL is a required parameter: it should be defined base_url = none
- Optional parameters defined in the
[revtree] # regular expression for branch recognition # (always define 2 named groups: 'branch' and 'path') branch_re = ^(?P<branch>branches/[^/]+|trunk|data)(?:/(?P<path>.*))?$ # space-separated list of branches that should be considered as 'trunks' trunks = trunk # SVG rendering scale (real number) scale = 1 # oldest revision to consider (default to the latest revision in the repos) revbase = 1 # whether time filters are related to the youngest revision or # based on absolute time reltime = True # default appearance (either 'compact' or 'timeline') style = compact
Some settings deserve additional information:
styleoption defines the default revtree graph style. Each user overwrites the default style the first time he updates the revtree style.
reltimeoption cannot be customized by the users. The admin choses whether the time filters are based on the absolute time or the youngest changeset in the repository. Let's say the youngest revision in the repository has been committed three days ago:
reltimeis set, the revtree time starts three days ago as well: if the user selects the last 2 days as a filter, the last 5 days (3+2) would be shown
reltimeis not set, the revtree time starts now: if the user selects the last 2 days, no changeset would be shown.
Revtree menu item
You can change the position of the revtree menu item using the Trac
mainnav setting, see TracIni.
For example, to make the revtree menu item appear at the right hand side
of the browser item, update the
mainnav line as follows:
[trac] mainnav = wiki,timeline,roadmap,browser,revtree,tickets,newticket,search
The RevtreePlugin defines a new permission
REVTREE_VIEW. This permission
should be defined for the 'revtree' link to appear in the main navigation bar,
and to give access to the revtree feature.
You need to restart your web server to make the changes effective.
Revision tree enhancements
The RevtreePlugin has been written with customization in mind: it provides extension points so that one can write his own plugin(s) to add information to the rendered graph and enhance it.
For now, there are two ways to enhance the revision tree graph:
- Change the appearance of the rendered items, and add operations to
the graph. An operation is a relation between two distinct branches, such
as a merge operation.
-> this extension point is dedicated to provide operations that are not maintained by the underlying repository. These operations can be stored in revision properties, log message, or any other way: it depends on how a team use the repository.
- Improve the branch placement. One of the most difficult task to draw a
graphical representation of the repository is to find the best location for
each branch. The best location depends on how a team work, what is the
most important information to be represented, and to limit the number of
operation intersections as much as possible.
-> this extension point allows to provide a custom branch sorting. There are probably great algorithms that would allow to find the best branch placement.
The RevtreePlugin comes with default enhancers:
- SimpleEnhancer is a very basic enhancer that is only able to cope with branch creation and tagging.
- It uses a dummy placement algorithm, which placesthe trunk at the center of the graph, and tries to minimize (but often fails) the operation intersections.
The RevtreePlugin/LogEnhancer plugin is provided as an implemenation example of the first kind of enhancer.
(More technical doc to come about how to write your own enhancers)
What about the original revtree plugin?
It superseeds the SvnCcHelpersScript/RevTree plugin:
- it does not rely on any Clearcase external scripts nor on any SVN custom properties to build the graph,
- it does not use the GraphvizPlugin nor the Graphviz (dot) tool to render the graph. It is a pure Python implementation,
- it uses the Trac repository cache, which dramatically speeds up the generation of the graph
- it can be configured and extended to support custom repository organization
The older plugin code has been removed from the TracHacks.org repository.
If you have any issues, create a new ticket.
The RevtreePlugin uses the following libraries:
userprefs.png (16.0 KB) - added by 10 years ago.
User preferences (filters)
changeset-tip.png (47.2 KB) - added by 10 years ago.
Changeset info tip
revtree.png (92.5 KB) - added by 10 years ago.
Revtree view (compact mode)
revtree-stresstest.png (214.8 KB) - added by 10 years ago.
Revtree stresstest (timeline mode, reduced to 40%)
changeset-tip.2.png (79 bytes) - added by 10 years ago.
(empty image, attachment deletion is not allowed)
revtree2.png (79 bytes) - added by 10 years ago.
(empty image, attachment deletion is not allowed)
MainMenuItem.png (12.8 KB) - added by 9 years ago.
Revtree as a main menu item
ContextualMenuItem.png (12.5 KB) - added by 9 years ago.
Revtree as a contextual menu item
compatmatrix.txt (5.9 KB) - added by 9 years ago.
Compatibility matrix RST source (RST renderer is unavailable for now)
revtree.2.png (173.1 KB) - added by 9 years ago.
Revtree sample image (v0.6.0), w/ Firefox 3.0.1
Download all attachments as: .zip