How can I query my subversion repository?

后端 未结 10 666
谎友^
谎友^ 2021-01-31 05:08

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 sub

相关标签:
10条回答
  • 2021-01-31 05:42

    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.

    0 讨论(0)
  • 2021-01-31 05:50

    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 :-)

    0 讨论(0)
  • 2021-01-31 05:52

    there is no repository query language or search api. for complex queries, you would need an repository indexer (like http://supose.soebes.de/wiki/supose) or a commit database (like http://www.viewvc.org/). http://markmail.org/thread/wszzgnrny6o2r7u7 has some more links.

    0 讨论(0)
  • 2021-01-31 05:55

    Apart from using a Subversion command-line or a graphical client such as TortoiseSVN to view svn repository history, you can install an advanced web interface for Subversion repos.

    For example, in VisualSVN Server 3.2 and newer you can use a web-based revision history viewer, see the demo here.

    See the description of the HTML5-based web svn client here.

    0 讨论(0)
  • 2021-01-31 05:56

    Currently no, there's no subversion query language or query based api that's in widespread use (ok, now watch someone contradict me, that's life on the net I suppose).

    This means you're limited to splicing together the outputs from the normal svn commands like

    svn info
    

    and

    svn log
    

    I'm sure something like bash or powershell could make this at least feasible. If you're stuck with windows batch, I'd start crying now.

    0 讨论(0)
  • 2021-01-31 06:01

    Check Fisheye . Really cool .

    http://211.144.86.166/software/fisheye/docs/EyeQL%20Reference%20Guide.html

    0 讨论(0)
提交回复
热议问题