| Version 11 (modified by Lele Gaifax, 7 years ago) (diff) |
|---|
Darcs plugin for trac 0.10
The new plugin is taking shape at
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:
- Get upstream trac, either current svn trunk or from my darcs repo at http://darcs.arstecnica.it/trac
a. $ darcs get --partial http://darcs.arstecnica.it/trac upstream-trac
- Get the plugin from the address above:
a. $ cd upstream-trac/trac/versioncontrol b. $ darcs get http://artiemestieri.tn.it/~lele/projects/trac-darcs darcs
- Apply the "trac-setup-2891.patch"
a. $ cd upstream-trac b. $ patch -p1 < trac/versioncontrol/darcs/trac-setup-2891.patch
- 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 initenv
- Upgrade and resync you the instance database
a. $ ~/.system/bin/trac-admin upgrade b. $ ~/.system/bin/trac-admin 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 :-)
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. |