wiki:DarcsPlugin

Version 15 (modified by Lele Gaifax, 7 years ago) (diff)

Markup

Darcs plugin for trac 0.10

The new plugin is taking shape at

 http://darcs.arstecnica.it/trac-darcs

Current version 0.3 does not require a patched version of trac!

Installing the module as a builtin

If you want to try it out follow these directions:

  1. Get upstream trac, either current svn trunk or from my darcs repo at  http://darcs.arstecnica.it/3rd/trac
       a. $ darcs get --partial http://darcs.arstecnica.it/3rd/trac upstream-trac
    
  1. Get the plugin from the address above:
       a. $ cd upstream-trac/trac/versioncontrol
       b. $ darcs get http://darcs.arstecnica.it/trac-darcs darcs
    
  1. Apply the "trac-setup-2891.patch"
       a. $ cd upstream-trac
       b. $ patch -p1 < trac/versioncontrol/darcs/trac-setup-2891.patch
    
  1. Install a private instance of trac:
       a. $ cd upstream-trac
       b. $ python setup.py install --prefix=~/.system
       c. $ export PYTHONPATH=~/.system/lib/python2.3/site-packages
       d. $ cd /tmp
       c. $ ~/.system/bin/trac-admin testinstance initenv
    
  1. Upgrade and resync your instance database
       a. $ ~/.system/bin/trac-admin testinstance upgrade
       b. $ ~/.system/bin/trac-admin testinstance resync
    

Installing an egg

The module is setuptools-aware, you can follow the good directions on  TracPlugins.

Enabling the plugin

The plugin, if installed as a global egg, needs to be enabled, with something like

  [components]
  trac.versioncontrol.svn_fs.* = disabled
  tracdarcs.* = enabled

(not sure if disabling svn is actually needed)

This step is not needed if you just drop the egg in the instance plugins directory.

NB: the tracdarcs above will change to trac.versioncontrol.darcs in the near future :-)

Upgrade and resync

Each created instance needs to be upgraded: this step creates the needed table in the database. You can see the two instructions at point 5. above.

Configuration

The DarcsPlugin follows the standard TracIni options to indicate the repository, such as

  [trac]
  repository_type=darcs
  repository_dir=/path/to/darcs/repository

It uses the following settings, if provided, in the [darcs] section of the TracIni file.

cachedir By default the darcs backend keeps a cache of the visited files at various revision inside the repository itself, in _darcs/trac_cache, that may be overridden by this option, setting it to the desired directory that needs to be writeable by the trac process.
command Name of the external darcs executable, default to darcs. This can be used to set up the environment as well, like in "DARCS_DONT_ESCAPE_ANYTHING=1 /usr/local/bin/darcs"
dont_escape_8bit This is a shortcut for "command=DARCS_DONT_ESCAPE_8BIT=1 darcs" (true, false). Default to false.
encoding Specify the encoding to be used on this repository. This goes together with dont_escape_8bit, when your repository metadata contains non-ascii glyphs.