[Trac] preliminary darcs implementation

Justus Pendleton justus at ryoohki.net
Sat Jan 1 17:39:35 EST 2005


I have a first pass at letting trac talk to darcs repositories.  It isn't
complete but seems to work for what I've done.  I've added infrastructure so
that other systems -- monotone, arch -- could conceivably be used as well, but I
haven't bothered with the backends for those.  Having trac use multiple
repositories shouldn't be too hard, either.

For those who want to take a look, the darcs repository of my changes is
available at http://www.ryoohki.net/~justus/trac and I have a tracd running at
http://www.ryoohki.net:8080 against a darcs repository.

What works:
- the Timeline view
- the Changeset view, although I haven't added in diffs yet
- the Browser view, but only for "head" and it is pretty slow right now
- tracd
- all of the stuff that didn't talk to subversion directly: Wiki, Tickets, and
Roadmap
- subversion access still works

What doesn't work:
- trac-admin.  to create a darcs repository you need to set up an env by hand

What I've done is create a new package trac.repository that has a factory
method.  Each backend has its own class and needs to support the API that is
loosely documented in Repository.py.  So I ripped out all of the svn specific
stuff and put it in trac/repository/Subversion.py, trying to clean up the
interfaces a little bit but generally leaving the code as it was.

There is also a new configuration option "repository" which has the format
repository = TYPE LOCATION
repository = svn /var/www/svn

If you don't have repository defined but do have the old repos_dir config
variable then it uses that path and assumes it is a subversion repository.

I'll be working on adding the rest of the darcs support and possibly cleaning up
the code and interfaces in the near future.  I also need to test everything lots
to make sure a) darcs works more or less as expected and, b) subversion still
works as it used to.

Happy New Year,
Justus



More information about the Trac mailing list