= Trac and Subversion = Trac has supported the [http://subversion.tigris.org Subversion] VersioningSystemBackend since day one. Actually, Trac was even named `svntrac` back then! This page is intended to collect all the specific tips and tricks about Subversion support ''in Trac''. This is not the place for general Subversion help. You can get [wiki:TracSubversion#AskingforMoreSupportAboutSubversion more support] options elsewhere. At the time of this writing, the preferred Subversion version for Trac is still 1.2.3. If you are willing to make a few changes to the stock 1.3.0, that version works also pretty well. == Building Subversion == The point is not to repeat the excellent build instructions found elsewhere, but rather to clarify the general approach: Trac actually needs the SWIG bindings for Subversion that are bundled with the Subversion distribution. In order to build them, you (obviously) need to build first Subversion, then the bindings. * Read the `INSTALL` file that sits at toplevel of the Subversion source distribution * Do `./configure ...; make; make install` * Read `./subversion/bindings/swig/INSTALL` in order to build the bindings. In particular, pay attention to the version of SWIG which can be required (1.3.0 comes with pregenerated wrappers, though). Do not install swig 1.3.28 or 1.3.29. Version 1.3.27 seems to works fine. * Do `make swig-py; make install-swig-py` * Adapt your `PYTHONPATH` so that it contains the `svn-python` folder (the one containing the `svn` and `libsvn` packages). == Trac and specific Subversion versions == {{{ #!comment The following info about pre 1.3.0 versions is all ''by heart'' and is probably inaccurate at places. This is mostly to get the page started. Feel free to correct me and publicly humiliate me :) }}} === Trac and Subversion 1.0 === This is the oldest supported Subversion version. === Trac and Subversion 1.1 === This release introduced the `fsfs` repository backend, which is to be preferred over the `bdb` one (see #571 for example). When creating a repository with this Subversion version, take care of using the `--fs-type fsfs` switch with the `svnadmin create` command. Version 1.1.4 is the last stable one for that maintenance branch. === Trac and Subversion 1.2 === This release makes the `fsfs` storage the default. Version 1.2.3 is the last stable one for that maintenance branch. === Trac and Subversion 1.3 === This is the newest major release for Subversion, and it is currently support by Trac 0.9.x and beyond, with a few caveats. ==== Trac and Subversion 1.3.0 ==== There are a few known issues with the stock 1.3.0 version: * Issue #2472 (spurious exception) [[BR]] which can be fixed by applying this [/trac/ticket/2472#change_12 patch] to `subversion/bindings/swig/python/svn/core.py` [[BR]] Should be fixed in Subversion 1.3.1 (!r17992). * Issue #2620 (memory leak) [[BR]] which can be fixed by applying this [/trac/ticket/2620#change_10 patch] to `subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c`. [[BR]] Should be fixed in Subversion 1.3.1 (!r18230). With those fixes, I've been able to use the Subversion backend flawlessly "in production", since end of January 2006. However, some people are seeing yet another problem, which requires one more fix: * Issue #2611 (intermittent fatal error) [[BR]] which can be fixed by applying this [attachment:ticket:2611:application_pool_race_condition_fix.txt patch] to `subversion/bindings/swig/include/proxy_apr.swg`. Note that this requires to regenerate the SWIG bindings, as explained in [/trac/ticket/2611#change_21 here]. It should be emphasized that a compatible version of SWIG must be used (`1.3.24`, `1.3.25`). [[BR]] Should be fixed in Subversion 1.3.1 (!r18721). Someone wrote: ''Using Subversion 1.3.0 and SWIG 1.3.28 causes no problems or issues described above and requires no modifications to the stock code.'' I'd be interested to see what backs up the above claim. It doesn't seem to me that either 1.3.0 or 1.3.1 actually support SWIG 1.3.28. However, the Subversion trunk does, and probably 1.3.2 will too (see [http://svn.collab.net/repos/svn/branches/1.3.x/STATUS STATUS]). [[BR]] --cboos ==== Trac and Subversion 1.3.1 ==== As mentioned above, the issues found with 1.3.0 should be fixed by 1.3.1. However, I've not ''yet'' tried 1.3.1. so I can't tell for sure that there won't be any issues... I am using Trac with Subversion 1.3.1 on Gentoo ~x86 and it works fine. I am using swig 1.3.25 and trac 0.9.5. --Peter == Asking for More Support About Subversion == * !ReadTheFineBook: http://svnbook.red-bean.com and/or the [http://subversion.tigris.org/faq.html FAQ] * There's also a `#svn` channel on IRC * If you think you've found a bug in Subversion, read those [http://subversion.tigris.org/project_issues.html instructions]