From 28e3c78ee22faf3b45ab7747ba62cc0b2a0a19d6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Jun 2016 14:18:59 +0200 Subject: [PATCH] looks like svn 1.8 changed output of svn log --xml a bit, using now paths->path to identify tag --- doc/rpm-build/checkout-build-archives.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/rpm-build/checkout-build-archives.php b/doc/rpm-build/checkout-build-archives.php index 449db60f4d..0cd5c9a367 100755 --- a/doc/rpm-build/checkout-build-archives.php +++ b/doc/rpm-build/checkout-build-archives.php @@ -508,10 +508,9 @@ function do_editchangelog() } // query changelog per repo $changelog = ''; - $last_tag = null; + $last_tag = $revision = null; foreach($config['modules'] as $branch_url => $modules) { - $revision = null; if (substr($branch_url, -4) == '.git') { list($path) = each($modules); @@ -579,7 +578,7 @@ function get_changelog_from_svn($branch_url, $log_pattern=null, &$revision=null, list($tags_url,$branch) = preg_split('#/(branches/|trunk)#',$branch_url); if (empty($branch)) $branch = $config['version']; $tags_url .= '/tags'; - $pattern='/tags\/('.preg_quote($config['version'], '/').'\.[0-9.]+)/'; + $pattern='|/tags/('.preg_quote($config['version'], '|').'\.[0-9.]+)|'; $matches = null; $revision = get_last_svn_tag($tags_url,$pattern,$matches); $tag = $matches[1]; @@ -656,7 +655,7 @@ function get_last_svn_tag($tags_url,$pattern,&$matches=null) { global $verbose,$svn; - $cmd = $svn.' log --xml --limit 40 '.escapeshellarg($tags_url); + $cmd = $svn.' log --xml --limit 40 -v '.escapeshellarg($tags_url); if (($v = $verbose)) { echo "Querying SVN for last tags\n$cmd\n"; @@ -671,8 +670,8 @@ function get_last_svn_tag($tags_url,$pattern,&$matches=null) foreach($xml as $log) { //print_r($log); - if ($pattern[0] != '/' && strpos($log->msg,$pattern) !== false || - $pattern[0] == '/' && preg_match($pattern,$log->msg,$matches)) + if ($pattern[0] != '/' && strpos($log->paths->path, $pattern) !== false || + $pattern[0] == '/' && preg_match($pattern, $log->paths->path, $matches)) { if ($verbose) echo "Revision {$log['revision']} matches".($matches?': '.$matches[1] : '')."\n"; return (int)$log['revision'];