bloodhound-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Duncan...@jdunk.com>
Subject Re: bloodhound svn setup issue
Date Wed, 18 Sep 2013 17:28:13 GMT
*Update:* "sudo apt-get install python-subversion" solved the sync issue.
 (I had previously tried "sudo apt-get install python-svn" which did not.)
 So if these bindings aren't supposed to be necessarily present
post-install, perhaps this step could be added to the list of optional
pre-requisites and/or especially the RepositoryAdmin wiki page.

However, at first the "Source" navigational tab linked to
http://bh.mysite.com/wiki/Guide/RepositoryAdmin and not the repository
browser.  And when I manually typed in the "browser" URL (
http://bh.mysite.com/browser ), I got this:

Repository IndexName **SizeRevAgeAuthorLast Change*
myrepo<http://bh.mysite.com/browser/myrepo>
*––*TracError: Unsupported version control system "svn": No module named svn
*

============

And when I clicked on "myrepo" I got an error page:


Bloodhound Error

Unsupported version control system "svn": No module named svn

Guide/Index <http://bh.mysite.com/wiki/Guide/Index> — The Trac User and
Administration Guide


=============

After I restarted Apache, however, everything was fine and I was able to
browser the repo files, revision log, and diffs.  Hope this is useful for
posterity.


On Wed, Sep 18, 2013 at 1:13 AM, Jared Duncan <j@jdunk.com> wrote:

> Hi all.  It seems there is an issue with svn integration working with
> bloodhound out of the box.
>
> TLDR: Is Bloodhound supposed to come with the python-svn bindings
> included?  There doesn't appear to be any bloodhound-specific documentation
> on version control integration, and the trac docs seem to say that it
> should be built in by default.
>
> ===
>
> What I've done:
> 1. Admin -> Plugins -> Trac 1.0.1 -> Enabled everything with "subersion"
> in the name.
> 2. Success
>
> Success The following components have been enabled: SubversionConnector
> (tracopt.versioncontrol.svn.svn_fs.*)SubversionMergePropertyDiffRenderer
> (tracopt.versioncontrol.svn.svn_prop.*) SubversionMergePropertyRenderer
> (tracopt.versioncontrol.svn.svn_prop.*)SubversionPropertyRenderer
> (tracopt.versioncontrol.svn.svn_prop.*)
>
> 3. Admin -> [Version Control] Repositories -> Add Repository
> 4. Received success message:
>
> ×Success
>
>    - The repository "myrepo" has been added.
>    - You should now run trac-admin $ENV repository resync "myrepo" to
>    synchronize Trac with the repository.
>    - You should also set up a post-commit hook on the repository to call trac-admin
>    $ENV changeset added "myrepo" $REV for each committed changeset.
>
>
> 5. $ trac-admin <env> repository resync "myrepo"
> TracError: Unsupported version control system "svn": Can't find an
> appropriate component, maybe the corresponding plugin was not enabled?
>
> 6. Googled. Best apparent match:
> http://trac.edgewall.org/wiki/TracSubversion#unsupported-vcs :
> Unsupported version control system "svn"<http://trac.edgewall.org/wiki/TracSubversion#unsupported-vcs>
>
> By far one of our most commonly reported installation issue (search:'"Unsupported
> version control system"'<http://trac.edgewall.org/search?q=%22Unsupported+version+control+system%22>),
> this simply means that the Python bindings for Subversion can't be loaded
> by Trac.
>
> For Trac 1.0 (trunk) above [11082]<http://trac.edgewall.org/changeset/11082>,
> another common cause might simply be that the components for Subversion,
> are not enabled, since they're now optional. See#tracopt<http://trac.edgewall.org/wiki/TracSubversion#tracopt>
above
> for more details.
> ...
>
> Verify that you can load the bindings using the Python interactive
> interpreter
>
> $ python
> Python ...
> >>> from svn import core
>
> If it doesn't succeed, it usually means that your bindings are located in
> a place they can't be loaded from. So either move the svn and libsvn found
> in the /opt/subversion-xxx/lib/svn-python folder into your site-packages
> folder, or add the above folder to your PYTHONPATH, or create a ​svn.pth<http://docs.python.org/lib/module-site.html>
file
> in your Python site-packages folder with the above folder path as its
> single line content (an example on a FreeBSD installation, again:
> /usr/local/lib/pythonN.N/site-packages/).
>
> ==================
>
> 7. Checked my setup:
>
> $ cd /www/bh.mysite.com/python-virtualenv/lib/python2.7/site-packages/
> $ find . -iname '*svn*'
> ./trac/tests/functional/svntestenv.py
> ./trac/tests/functional/svntestenv.pyc
> ./trac/versioncontrol/svn_prop.pyc
> ./trac/versioncontrol/svn_prop.py
> ./trac/versioncontrol/svn_fs.py
> ./trac/versioncontrol/svn_authz.py
> ./trac/versioncontrol/svn_fs.pyc
> ./trac/versioncontrol/svn_authz.pyc
> ./acct_mgr/svnserve.pyc
> ./acct_mgr/svnserve.py
> ./tracopt/versioncontrol/svn
> ./tracopt/versioncontrol/svn/svn_prop.pyc
> ./tracopt/versioncontrol/svn/svn_prop.py
> ./tracopt/versioncontrol/svn/svn_fs.py
> ./tracopt/versioncontrol/svn/svn_fs.pyc
> $ which python
> /var/www/bh.mysite.com/python-virtualenv/bin/python
> $ python
> Python 2.7.3 ...
> >>> from svn import core
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named svn
> >>> import site; site.getsitepackages()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'getsitepackages'
>
> ===
>
> 8. Given the presence of what appears to be svn python bindings in the
> python-virtualenv dir, and the failure of "site.getsitepackages()" to get
> the site-packages path, I am thinking the latter might be the reason trac
> can't find the former.  If so, I'm concerned by this:
>
> (from https://github.com/pypa/virtualenv/issues/355)
>
> <https://github.com/leoliu>
> leoliu <https://github.com/leoliu> opened this issue 10 months agosite.py not compatible
with python 2.7
> No milestone
> No one is assigned
>
> We use python 2.7 exclusively and it is a surprise to discover today that
> site.py in all virtual envs with python 2.7 use py2.6's site.py which lacks
> many new functions added in python 2.7.
>
> ...but that's probably going too far at this point.  First, I should ask
> if Bloodhound is supposed to come with the svn bindings built in or not
> (since I can't tell if what's in lib is the right stuff or not).  There
> doesn't appear to be any bloodhound-specific documentation on version
> control integration, and the trac docs seem to say that it should be built
> in by default.
>
>

Mime
View raw message