Skip to content

Instantly share code, notes, and snippets.

@soywiz
soywiz / getSubversion17MaxRevisionFromFolder
Created October 5, 2011 23:30
Obtain the max revision from a Subversion 1.7 repository
<?php
function getSubversion17MaxRevisionFromFolder($checkoutFolderPath) {
$db = new PDO('sqlite:' . realpath($checkoutFolderPath) . '/.svn/wc.db');
foreach ($db->query('SELECT MAX(revision) FROM NODES;') as $row) return $row[0];
return false;
}