How to upgrade from the soon-to-be-defunct trac+darcs to the nice new trac-darcs plugin:
Starting out
Bring apache down:
/etc/init.d/apache2 stop
Create an install directory
cd mkdir -p install/dtPlugins cd install
Remove your old trac (otherwise you'll get weird errors like 'module' object has no attribute 'get_cnx_pool'):
cd /usr/lib/python-2.3/site-packages rm -rf trac
Get the latest version of trac! Anything below 0.10 will simply not do
svn co http://svn.edgewall.com/repos/trac/trunk trac cd trac python setup.py build python setup.py install cd ..
Get Lele's plugin:
darcs get http://darcs.arstecnica.it/trac-darcs cd trac-darcs python setup.py bdist_egg cp dist/TracDarcs-0.3-py2.3.egg ~/install/dtPlugins cd ..
For each environment...
cd /var/trac/THE_ENVIRONMENT
copy the egg in
cp ~/install/dtPlugins/TracDarcs-0.3-py2.3.egg plugins
edit conf/trac.ini, and replace repository_dir=darcs:/foo with
repository_type = darcs repository_dir = /foo
also in conf/trac.ini, add
[components] trac.versioncontrol.svn_fs.* = disabled tracdarcs.* = enabled
Upgrade the database:
trac-admin . upgrade trac-admin . resync
Final steps
- Say a prayer, knock on wood, etc.
Restart apache:
/etc/init.d/apache2 start
Problems
'module' object has no attribute 'get_cnx_pool'
- You need to completely remove your old trac before installing the new one
on resync - Command failed: darcs:/var/darcs/foo does not appear to be a Subversion repository.
- you forgot to copy the egg in
on resync - Command failed: list index out of range
- ???
- I think this happens when your repository is empty
on resync - Command failed: No node at u'foo' in revision NNN
- ??? Lele is looking into the problem now. Unfortunately, this means no timeline and no browser for you until we figure out why this happens
Related: when visiting the timeline: TypeError: argument to += must be iterable
Related: visiting browse source: unsubscriptable object
- Unsupported version control system "darcs"
??? Does anybody else get this? I think it's just that you have to enable the plugin, but I'm not sure because you would think this wouldn't be neccesary with the local install only
