From bf0fda261436941b166ef707f6672263e5774d20 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 28 Aug 2005 21:44:27 +0000 Subject: [PATCH] Logs now have changed files --- includes/svnlib.php | 14 ++++++++++++-- log.php | 20 +++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/includes/svnlib.php b/includes/svnlib.php index eae18d9..6cf296a 100644 --- a/includes/svnlib.php +++ b/includes/svnlib.php @@ -246,7 +246,7 @@ class SVNLib $repospath = $viewsvn->repos->fetch_path($repos, false); - return $this->svn('log -r' . $hirev . ':' . $lorev . ' ' . $repospath . $path); + return $this->svn('log -v -r' . $hirev . ':' . $lorev . ' ' . $repospath . $path); } /** @@ -632,9 +632,19 @@ class SVNLog $lastrev = $matches[1]; } + else if (preg_match('#^\s+([ADM])\s(.*)#', $line, $matches)) + { + $this->logs["$lastrev"]['files'][] = array( + 'action' => $matches[1], + 'file' => $matches[2] + ); + } else { - $this->logs["$lastrev"]['message'] .= $line . "\n"; + if (trim($line) != 'Changed paths:') + { + $this->logs["$lastrev"]['message'] .= $line . "\n"; + } } } diff --git a/log.php b/log.php index 8c81f91..21665f7 100644 --- a/log.php +++ b/log.php @@ -36,7 +36,25 @@ foreach ($logs->fetch() AS $log) echo "\n"; foreach ($log AS $key => $val) { - echo '
  • ' . $key . ': ' . nl2br(htmlspecialchars($val)) . '
  • '; + if ($key == 'files') + { + echo "\n"; + echo '
  • files:
  • '; + echo "\n"; + echo ''; + echo "\n"; + } + else + { + echo '
  • ' . $key . ': ' . nl2br(htmlspecialchars($val)) . '
  • '; + } echo "\n"; } echo ''; -- 2.43.5