How to upgrade from the soon-to-be-defunct trac+darcs to the nice new trac-darcs plugin:

Starting out

  1. Bring apache down:

    /etc/init.d/apache2 stop
    
  2. Create an install directory

    cd
    mkdir -p install/dtPlugins
    cd install
    
  3. 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
    
  4. 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 ..
    
  5. 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...

  1. cd /var/trac/THE_ENVIRONMENT
    
  2. copy the egg in

    cp ~/install/dtPlugins/TracDarcs-0.3-py2.3.egg plugins
    
  3. edit conf/trac.ini, and replace repository_dir=darcs:/foo with

    repository_type = darcs
    repository_dir = /foo
    
  4. also in conf/trac.ini, add

    [components]
    trac.versioncontrol.svn_fs.* = disabled
    tracdarcs.* = enabled
    
  5. Upgrade the database:

    trac-admin . upgrade
    trac-admin . resync
    

Final steps

  1. Say a prayer, knock on wood, etc.
  2. Restart apache:

    /etc/init.d/apache2 start
    

Problems

DarcsWiki: TracOnDarcs/Upgrading (last edited 2006-03-02 13:06:27 by EricKow)