Thursday, 9 July 2009

Get the Current Revision Number from Subversion over HTTP

Using code similar to that in the last article I found I could get the current revision number just change the code to match the following two lines:
request.Method = "PROPFIND";
and
var requestbody = "<D:propfind xmlns:D=\"DAV:\"><D:allprop/></D:propfind>";
The current revision number is buried somewhere in the response.

Getting more information about each revision is pretty simple too.
var requestbody = "<S:log-report xmlns:S=\"svn:\"><S:start-revision>2</S:start-revision>" +
"<S:end-revision>2</S:end-revision><S:discover-changed-paths/></S:log-report>";

No comments:

Post a Comment