21,6 → 21,7 |
function get_svn_revision($dir='') { |
if (!empty($dir)) $dir .= '/'; |
if (!is_dir($dir)) return false; |
if (is_dir($dir.'/.svn')) $dir .= '/.svn/'; |
|
// Try to find out the SVN version using the shell |
$output = @shell_exec('svnversion '.escapeshellarg($dir).' 2>&1'); |
66,6 → 67,10 |
} |
|
function get_svn_revision_without_sqlite3($svn_path, $base='trunk') { |
if (!empty($svn_path)) $svn_path .= '/'; |
if (!is_dir($svn_path)) return false; |
if (!is_dir($svn_path.'/.svn')) $svn_path .= '/../'; |
|
$fil = file_get_contents($svn_path.'/.svn/wc.db'); |
preg_match_all('@('.preg_quote($base,'@').'/[a-z0-9!"#$%&\'()*+,.\/:;<=>?\@\[\] ^_`{|}~-]+)(..)normal(file|dir)@', $fil, $m, PREG_SET_ORDER); |
|