Reputation: 546035
I'm trying to set up Trac on my server and have successfully installed it, compiled the bytecode and run the tracd server. The only problem is that it's not reading my SVN repository.
The error I'm receiving is:
Warning: Can't synchronize with the repository (Couldn't open Subversion repository /data1/repos: SubversionException: ("Expected FS format '2'; found format '4'", 160043)). Look in the Trac log for more information.
(Yes, my single repository is in a folder called "repos" - I didn't set that bit up)
The trac.ini
looks like this:
repository_dir = /data1/repos
repository_type = svn
I'm running: Trac 0.11.5, Python 2.4.3, Collabnet SVN 1.6.5, SWIG 1.3.29
Upvotes: 1
Views: 3146
Reputation: 1667
Looks like these guys answered your question pretty thoroughly but FYI: setup the log file so you can read it during your next problem. In your trac.ini somewhere:
[logging]
log_file = trac.log
# log_format = <inherited>
log_level = DEBUG
log_type = file
After that, try to deploy trac to apache if possible - with mod_python or FastCGI the trac documentation says it's a lot faster than running tracd.
Upvotes: 0
Reputation: 27313
you should make sure the python binding match your SVN version.
to get the binding you can use the SVN source and compile the wrapper, the install give an overview of the process how to build that binding.
first you would have to download the svn source
BUILDING SWIG BINDINGS FOR SVN ON UNIX
after build the swig binding
Step 1: Install a suitable version of SWIG (which is currently swig version 1.3.24 - 1.3.31).
* Perhaps your distribution packages a suitable version - if it
does install it, and skip to the last bullet point in this section.
* Go to http://www.swig.org/, download the source tarball, and
unpack.
* In the SWIG-1.3.xx directory, run ./configure. If you plan to build the Python bindings, and have a system with more than one version of Python installed, you may need to pass --with-python=/path/to/correct/python/binary to the configure script. You need Python 2.4 or above. If you plan to build the Perl bindings, and have a system with more than one version of perl installed, you may need to pass --with-perl5=/path/to/correct/perl/binary to the configure script. You need Perl 5.8.0 or above. * Build and install. Run 'make && make install' * To verify you have SWIG installed correctly, run "swig
-version" from the command line. SWIG should report that it is version 1.3.24 or newer.
and then python things
Step 3: Install Specific Language Bindings
Python
Run 'make swig-py' from the top of the Subversion source tree, to build the bindings.
(This will invoke SWIG on the *.i files, resulting in a collection of .c source files. It will then compile and link those .c files into Python libraries.)
Run 'make check-swig-py' from the top of the Subversion source tree, to test the bindings
Run 'make install-swig-py' (as root, typically) from the top of the Subversion source tree. This will copy your new Python libraries into the appropriate system location.
Note: If you don't have access to install to Python's site-packages directory, you can have the Python modules install to your home directory. You can do this by running 'make install-swig-py swig_pydir=~'.
Note: If you want to install to an alternate prefix (usually only if you are building packages), you can supply the prefix here. An example of doing this for building rpms looks like 'make install-swig-py DESTDIR=$RPM_BUILD_ROOT/usr'.
Make sure that whatever directory the bindings got installed in is in your Python search path. That directory depends on how you installed; a typical location is /usr/local/lib/svn-python/.
There are several ways to do this. See Python's documentation for 'sys.path' and 'PYTHONPATH'. A nice way to do this is: $ echo /usr/local/lib/svn-python \
/usr/lib/python2.x/site-packages/subversion.pth
You may also need to update your operating system's dynamic linker configuration to enable Python to load these new libraries. On some systems this is done by running 'ldconfig'.
Upvotes: 3
Reputation: 44321
It may be that the Subversion Python bindings are compiled against a too-old version of Subversion, but given FS format 2 is pre-1.0, it's possible something else is wrong. You can get the Subversion client library version like this:
>>> import svn.client
>>> svn.client.svn_client_version().major
1
>>> svn.client.svn_client_version().minor
6
>>> svn.client.svn_client_version().patch
5
Upvotes: 2