我试图使用Python SVN绑定(pysvn)在存储库上执行导出,并遇到以下错误:
python: subversion/libsvn_subr/dirent_uri.c:955: svn_dirent_join: Assertion `svn_dirent_is_canonical(base, pool)' failed.
Aborted (core dumped)
示例代码是:
import pysvn
client = pysvn.Client()
uri = 'https://svn.mycompany.com/myproject/trunk/'
# This works fine
print client.list(uri)
# This crashes with the above error
r = client.export(uri, './temp', force=True)
但是,从shell提示符执行svn导出–force https://svn.mycompany.com/myproject/trunk/可以正常工作.
我正在使用:
> Python 2.7.3
> Subversion 1.7.5
> CentOS 6.0 x64
请问有什么想法吗?
解决方法:
Subversion API在内部使用规范URL和路径.您的URL有尾部斜杠,这不是规范的URL.删除尾部斜杠或使用svn_uri_canonicalize()函数在调用Subversion API函数之前规范化URL.
您可以在Subversion API文档中找到更多详细信息:
http://subversion.apache.org/docs/api/latest/svn_dirent_uri_8h.html
原文地址:https://codeday.me/bug/20190626/1289395.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。