I'm curious how you make use of this in your IDE. Got any sample code (pseudo-code would be fine). Also, would you mind updating this for the new API changes that went in? It's basically s/JSON/WebAPI/g and s/json/webapi/g/
Create a mechanism to fetch SVN repository info via JSON
Review Request #220 — Created Feb. 6, 2008 and submitted
|Review Board SVN (deprecated)|
I'm writing a plugin for IntelliJ IDEA (a Java IDE) that will publish code reviews to Review Board (http://code.google.com/p/idea-reviewboard/). Currently our company has a similar plugin for Code Striker, so getting this working is the last thing we need before everyone will migrate to Review Board. What I'd like to be able to do is have the plugin inspect the local checkout and then automatically determine the correct repository and base diff path. This is complicated by the fact that Subversion checkouts might not use the same repository URL as the server. For example, one person might be using "http://svn/repos/" while another uses "http://svn.scm/repos" while another has an NFS mount and uses "file:///mnt/svn/repos". The only sure way to identify same repositories is by the repository UUID. Similarly, to determine the correct base diff path, I need to know the repository root (in case Review Board is configured with "http://svn/repos/trunk" or something). So this is some code that lets me get that information from Review Board via JSON. I'm not sure if this is the best way to go about it, but it serves my purposes. It's perhaps a little weird to throw a method in there that only works for Subversion repositories. Maybe you can come up with something better? But I'd love it if this could get checked in. Otherwise I'll have to tell people to apply a patch to their server if they want to use my plugin. Let me know what you think. Thanks!
I've used this to submit reviews. It works for me.
Committed as r1263. Thanks!