在linux下使用python可以通過svn的hook進行二次開發。
但是,如果要使用python通路svn的API (from svn import fs, repos),需要安裝相關包,否則出現如下錯誤:找不到svn包
[email protected]:/usr/lib/python2.7# python
Python 2.7.3 (default, Apr 20 2012, 22:44:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import fs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named svn
解決辦法: 安裝python-subversion。按照如下操作。
apt-get install python-subversion
注: apt-get是Ubuntu線上安裝軟體的工具,其相關配置方法見
http://happycool.blog.51cto.com/6045742/1004819
轉載于:https://blog.51cto.com/happycool/1006108