Search code examples
pythonsvnwindows-7tracbitnami

Trac will not resync with SVN repository


After a bit of fighting, and switching to Bitnami's Trac installer, I still couldn't get my repository to be recognized by Trac. New repos set up through Trac seemed to work to some extent simply as blank repositories. The issue was I couldn't sync to them.

Specifically:

trac-admin [Trac folder]\[projects]\[project] repository resync (default)
TracError: Unsupported version control system "svn": cannot import name fs

I'm pretty sure the problem runs deeper, as that's an untouched SVN made by the Bitnami Trac Stack application. Additionally, as far as I know, this is the packaged version of Python it's using.

The log file says

2014-07-18 14:23:46,542 Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "c:\users\user\appdata\local\temp\easy_install-4vaacr\Trac-1.0-py2.7-win32.egg.tmp\tracopt\versioncontrol\svn\svn_fs.py", line 273, in __init__
    _import_svn()
  File "c:\users\user\appdata\local\temp\easy_install-4vaacr\Trac-1.0-py2.7-win32.egg.tmp\tracopt\versioncontrol\svn\svn_fs.py", line 72, in _import_svn
    from svn import fs, repos, core, delta
ImportError: cannot import name fs

I am using Windows 7. Additionally, the repository set up by Trac can't be opened in TortoiseSVN Repository Browser:

Unable to connect to a repository at URL 'file:///E:/Bitnami/Trac/default'
Unable to open an ra_local session to URL
Unable to open repository 'file:///E:/Bitnami/Trac/default'
Expected FS format between '1' and '4'; found format '6'

Solution

  • In my case, it was an issue where Trac was trying to call the version of Python I installed for personal use, but installed things for its own copy, so I uninstalled it all, reinstalled it without a personal copy of Python, and ran it again. This time I got that various libraries weren't installed, which I could have sworn Bitnami took care of before.

    All that it took to fix this was:

    easy_install Trac==1.0
    

    Setuptools, amd thus easy_install, is installed with Bitnami, so this isn't an issue. Afterwards I could sync the repository normally.