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?
SVN has incremented the version of your file (NOT the repository… just the file) to the next logical revision, revision 2. If you want to review what's happened to your files then you can check this by selecting the top-level parent folder and clicking on the Visual SVN 'Show log' option.
You could use the SvnQuery project (http://svnquery.tigris.org) which has the intention to provide a query interface for doing such queries. It has a .NET API and a web frontend, providing the same query language. You can do complex queries with operators, nested expressions, wildcards, phrases and gap phrases. The operator you ask for, calculating the difference between now and the last commit date, is not implemented, but as it is an open source project you can either volunteer to do it or post a feature request for it :-)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With