wiki:WikiStart

Version 2 (modified by Thomas Moschny, 18 years ago) ( diff )

Wikified README.

Welcome to the TracMonotone site

TracMonotone is a plugin for Trac that allows a Trac project to use a Monotone instead of a Subversion repository. The plugin enables you to browse your project's sourcecode, view changesets, etc., like in any other Trac project. Revisions can be linked to from wiki pages, tickets, and any other place that contains wiki text, e.g. commit messages, and they can be specified either using their hex-id, or via a tag or branch name, and later via Monotone selectors, too.

Warning

The plugin is currently neither stable nor optimized for high performance. Some things work, others don't.

However, your feedback is welcome!

Prerequisites

  • A Monotone 0.28 (or later) binary.
  • Python 2.4.
  • An installation of Trac. You can either use 0.10 or 0.11dev.
  • Python setuptools >= 0.6.
  • The Python Bindings for BerkeleyDB (pyBSDdb), if you want to use the plugin together with mod_python.

Installation

  • Create a Python egg: run python ./setup.py bdist_egg in the plugin's toplevel dir.
  • Put the generated egg into the plugins directory of your project.
  • Add repository_type = mtn and repository_dir = path_to_mtn_db options to the [trac] section of the conf/trac.ini file of your project.
  • Enable the plugin by adding the option tracvc.mtn.* = enabled to the [components] section of the conf/trac.ini file.
  • (Re-)start the webserver or tracd.
  • That's it :)

Configuration

All configuration options have to be placed in the [mtn] section of the conf/trac.ini file.

  • The full path to the Monotone binary can be specified using the mtn_binary option.
  • A caching method for Monotone manifests, certs, changesets, etc. can be specified using the cachespec option. The format is: cachespec = backend[:option1[:option2[...]]] Currently these backends are provided:
    • localmem: (default) uses local memory for caching. Takes no options.
    • dbmshelve:prefix: Persistent, uses Unix DBM databases named prefix*.{pag|dir}. All directories in prefix must exist. Not suited for concurrent access by more than one process.
    • bsddb:dir:prefix: Uses the bsddb3 binding to a persistent BerkeleyDB database. The directory 'dir' must be writable by trac.

Selecting the Caching Method

For better performance you should use a disk-based caching method. If you run a standalone version of Trac (tracd), you can either use 'dbmshelve' or 'bssdb'. If you use Trac via mod_python, you *must* use 'bsddb', because the 'dbmshelve' method doesn't support concurrent access by multiple processes.

It is not recommended to use the 'localmem' method other than for testing purposes, because it keeps all entries in memory until the server process is restarted.

Known Problems/Missing Features

  • Security: The monotone select functionality is exposed. Monotone binaries prior to version 0.27 are susceptible for SQL injections.
  • Revisions are almost always printed as complete 40-char string.
  • The changeset displays doesn't show attr changes.
  • Log on a per-file basis is missing..
  • The lifetime for cached data should be adjustable.
  • Support for trac-admin is missing. (?)

Author

Thomas Moschny (thomas DOT moschny AT gmx.de)

Licence

GPL, see COPYING.

Note: See TracWiki for help on using the wiki.