| 1 | = Trac and Subversion = |
| 2 | |
| 3 | Trac supports the [http://subversion.tigris.org Subversion] VersioningSystemBackend since day one. |
| 4 | Actually, Trac was even named `svntrac` back then! |
| 5 | |
| 6 | This page is intended to collect all the specific tips and tricks |
| 7 | about Subversion support ''in Trac''. This is not the place for general |
| 8 | Subversion help. |
| 9 | You can get [wiki:TracSubversion#AskingforMoreSupportAboutSubversion more support] |
| 10 | options elsewhere. |
| 11 | |
| 12 | At the time of this writing, the preferred Subversion version for Trac is still 1.2.3. |
| 13 | If you are willing to make a few changes to the stock 1.3.0, that version works also |
| 14 | pretty well. |
| 15 | |
| 16 | == Building Subversion == |
| 17 | |
| 18 | The point is not to repeat the excellent build instructions found elsewhere, |
| 19 | but rather to clarify the general approach: Trac actually needs the SWIG bindings |
| 20 | for Subversion that are bundled with the Subversion distribution. |
| 21 | In order to build them, you (obviously) need to build first Subversion, |
| 22 | then the bindings. |
| 23 | * Read the `INSTALL` file that sits at toplevel of the Subversion source distribution |
| 24 | * Do `./configure ...; make; make install` |
| 25 | * Read `./subversion/bindings/swig/INSTALL` in order to build the bindings. |
| 26 | In particular, pay attention to the version of SWIG which can be required |
| 27 | (1.3.0 comes with pregenerated wrappers, though). |
| 28 | * Do `make swig-py; `make install-swig-py` |
| 29 | * Adapt your `PYTHONPATH` so that it contains the `svn-python` folder |
| 30 | (the one containing the `svn` and `libsvn` packages). |
| 31 | |
| 32 | == Trac and specific Subversion versions == |
| 33 | {{{ |
| 34 | #!comment |
| 35 | The following info about pre 1.3.0 versions is all ''by heart'' |
| 36 | and is probably inaccurate at places. |
| 37 | This is mostly to get the page started. |
| 38 | Feel free to correct me and publicly humiliate me :) |
| 39 | }}} |
| 40 | |
| 41 | === Trac and Subversion 1.0 === |
| 42 | This is the oldest supported Subversion version. |
| 43 | |
| 44 | === Trac and Subversion 1.1 === |
| 45 | This release introduced the `fsfs` repository backend, |
| 46 | which is to be preferred over the `bdb` one (see #571 for example). |
| 47 | When creating a repository with this Subversion version, |
| 48 | take care of using the `--fs-type fsfs` switch with the `svnadmin create` |
| 49 | command. |
| 50 | Version 1.1.4 is the last stable one for that maintenance branch. |
| 51 | |
| 52 | === Trac and Subversion 1.2 === |
| 53 | This release makes the `fsfs` storage the default. |
| 54 | Version 1.2.3 is the last stable one for that maintenance branch. |
| 55 | |
| 56 | === Trac and Subversion 1.3 === |
| 57 | This is the newest major release for Subversion, and it is currently |
| 58 | support by Trac 0.9.x and beyond, with a few caveats. |
| 59 | |
| 60 | ==== Trac and Subversion 1.3.0 ==== |
| 61 | |
| 62 | There are a few known issues with the stock 1.3.0 version: |
| 63 | * Issue #2472 (spurious exception) [[BR]] |
| 64 | which can be fixed by applying this |
| 65 | [/trac/ticket/2472#change_12 patch] to |
| 66 | `subversion/bindings/swig/python/svn/core.py` |
| 67 | * Issue #2620 (memory leak) [[BR]] |
| 68 | which can be fixed by applying this |
| 69 | [/trac/ticket/2620#change_10 patch] to |
| 70 | `subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c`. |
| 71 | |
| 72 | With those fixes, I've been able to use the Subversion backend |
| 73 | flawlessly "in production", since end of January 2006. |
| 74 | |
| 75 | However, some people are seeing yet another problem, which requires |
| 76 | one more fix: |
| 77 | * Issue #2611 (intermittent fatal error) [[BR]] |
| 78 | which can be fixed by applying this |
| 79 | [application_pool_race_condition_fix.txt patch] to |
| 80 | `subversion/bindings/swig/include/proxy_apr.swg`. |
| 81 | Note that this requires to regenerate the SWIG bindings, |
| 82 | as explained in [/trac/ticket/2611#change_21 here]. |
| 83 | It should be emphasized that a compatible version of SWIG |
| 84 | must be used (`1.3.24`, `1.3.25` and possibly(?) `1.3.28`). |
| 85 | |
| 86 | |
| 87 | |
| 88 | == Asking for More Support About Subversion == |
| 89 | |
| 90 | * !ReadTheFineBook: http://svnbook.red-bean.com and/or the |
| 91 | [http://subversion.tigris.org/faq.html FAQ] |
| 92 | * There's also a `#svn` channel on IRC |
| 93 | * If you think you've found a bug in Subversion, read those |
| 94 | [http://subversion.tigris.org/project_issues.html instructions] |
| 95 | |