ret*_*ile 10 python svn documentation
我在哪里可以找到使用subversion python绑定的好介绍?
我在svnbook中找到了一个讨论它的部分; 以及1.3中的一些基本例子.
有没有更彻底和最新的东西?
只想在这里补充一点说明.
感谢上面两个答案(@BenjaminWohlwend和@Logan),我意识到Subversion有多套Python绑定/接口; 我在我的Ubuntu 11.04盒子上做了这个:
$ apt-cache search '[Ss]vn|[Ss]ubversion' | grep -i python
python-svn - A(nother) Python interface to Subversion
python-svn-dbg - A(nother) Python interface to Subversion (debug extension)
python-subversion - Python bindings for Subversion
python-subversion-dbg - Python bindings for Subversion (debug extension)
python-opster - a python command line parsing speedster
python-py - Advanced Python testing tool and networking lib
python-rope - Python refactoring library
python-subvertpy - Alternative Python bindings for Subversion
可以查看Debian包文件列表,以确定它们引用的库; 所以我们有:
python-subversion-或SWIG绑定(或libsvn,libsvn_swig_py)文件列表 
import svn.core, svn.client ; from svn import fs, core, repospython-svn- 或pysvn 文件列表
python-subvertpy- 或subvertpy 文件列表
from subvertpy import delta, repos , from subvertpy.ra import RemoteAccess, Auth......我还在存储库中找到了另一个:
ctypes-python- 或csvn 来源
import csvn.core , from csvn.repos import *链接http://svn.apache.org/repos/asf/subversion(我从@BenjaminWohlwend获得)显然是Subversion源代码本身的Apache Software Foundation(asf?)Subversion存储库.
OP对文档的追求似乎与python-subversion(或SWIG绑定(或libsvn)有关;它的源代码构建指令在@Logan的帖子中.我找不到svn.developer更好的文档源:已经使用API了在OP中引用,除了bindings/swig/python/README ;它解释了SWIG如何从C生成Python接口:
翻译参数列表
SWIG绑定的参数减少定律是
这样的:Run Code Online (Sandbox Code Playgroud)- The module prefix can be omitted. o: void *some_C_function = svn_client_foo; becomes: import svn.client func = svn.client.foo[...]
然后,人们可以查看,例如,svn/core.py,并查找函数(和"明确定义的符号")svn_mergeinfo_merge; 注意到core.pyimport libsvn.core- libsvn可能是指.so从C文件libsvn_swig_py/swigutil_py.c构建的共享对象()文件.
然后,我们可以查找svn_mergeinfo_merge,并找到像SVNSearch这样的提交消息:Subversion(commit 23570 05.03.2007),它引用该函数,并且svn_mergeinfo.h; 进一步查找该文件,我们在ASF存储库中找到它:svn_mergeinfo.h,它确实包含:
/** Like svn_mergeinfo_merge2, but uses only one pool.
 *
 * @deprecated Provided for backward compatibility with the 1.5 API.
 */
SVN_DEPRECATED
svn_error_t *
svn_mergeinfo_merge(svn_mergeinfo_t mergeinfo,
                    svn_mergeinfo_t changes,
                    apr_pool_t *pool);
看到DEPRECATED那里,这里引用svn commit可能很好:r1175903(2011年9月26日星期一):
颠覆/ libsvn_subr/mergeinfo.c
(svn_mergeinfo_merge2):新的.
(svn_mergeinfo_merge):转到deprecated.c.
(svn_mergeinfo_catalog_merge):使用新API.
那就是 - 特定功能在2011年已被弃用 - 所以希望一个人的Python SVN绑定和SVN安装应该匹配......
这看起来是一个非常完整的文档:
http://pysvn.tigris.org/docs/pysvn_prog_ref.html
这里有几个例子:
http://svn.apache.org/repos/asf/subversion/trunk/tools/examples/