在给定的SVN存储库中,我试图编写一个脚本来查找创建分支的修订。在TortoiseSVN修订图中,您可以很容易地找到它们,所以我想这是可能的。在
到目前为止,我几乎可以通过解析xml格式的完整详细日志(svn log -v --xml
)和过滤logentry
节点(Python with minidom模块)来完成:
liste_revision = [item for item in doc.getElementsByTagName('logentry')
if (item.getElementsByTagName('path').length==1 and
item.getElementsByTagName('path')[0].getAttribute('kind')=="dir" and
item.getElementsByTagName('path')[0].getAttribute('action')=="A" and
"/branches/" in item.getElementsByTagName('path')[0].firstChild.nodeValue)]
我说这几乎是因为有一两件不需要的东西仍然会通过这些过滤器。这个算法也很重,因为我要过滤整个日志。在
所以我的问题是:
svn log --stop-on-copy
,但它似乎只适用于当前分支。在
目前没有回答
相关问题 更多 >
编程相关推荐