问题描述
目前我只想找到所有在过去 X 天内未被修改的文件,但最终我希望能够对我的 subversion 存储库进行更复杂的查询.
是否有某种类型的 Subversion 查询语言或我可以使用的 API?
您可以使用 svn log 命令生成一个 XML 文件,其中包含有关所有提交的大量信息,如下所示:
svn 日志 URL --xml --verbose >提交.xml
您可以使用更多选项来限制修订范围、获取有关 rev 道具的更多信息、包括合并信息等.
问题就变成了我如何对 XML 文档的内容执行查询",这比使用现有的 SVN API 更容易.例如,在 C# 中,您可以执行对 XML 的 LINQ 查询..>
Currently I would simply like to find all files that have not been modified in the last X days but ultimately I would like to be able to make more complex queries against my subversion repository.
Is there a Subversion Query Language of some sort or an API that I could use?
You can use svn log command to produce an XML file with a lot of information about all commits like this:
svn log URL --xml --verbose > commits.xml
There are some more options you can play with to limit the revision range, get more information on rev props, include merge info, etc.
The problem then becomes "how do I perform queries on the content of an XML document", which is easier than working with the existing SVN APIs. For example, in C# you can do LINQ queries on XML.
这篇关于如何查询我的 Subversion 存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!