Question

I have an PHP application on server example.com and I want to get the current revision of the svn-repository on host yyy.com without doing a checkout. How can I do this with PHP?

Was it helpful?

Solution

I will not speak to php, but you can check the revision from the info command

$svn info --xml http://missing-link.googlecode.com/svn/ant-http
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
   kind="dir"
   path="ant-http"
   revision="91">
<url>http://missing-link.googlecode.com/svn/ant-http</url>
<relative-url>^/ant-http</relative-url>
<repository>
<root>http://missing-link.googlecode.com/svn</root>
<uuid>34b72901-9e55-331d-4c20-7e8f93cd33ee</uuid>
</repository>
<commit
   revision="91">
<author>redacted@redacted.com</author>
<date>2011-08-19T12:41:43.691034Z</date>
</commit>
<lock>
<created>1970-01-01T00:00:00.000000Z</created>
</lock>
</entry>
</info>

OTHER TIPS

svn info | grep "Last Changed Rev:" | awk '{print $4}' will give you the last changed revision on the repo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top