Fixed to correctly parse the full message of an svn commit log.

This commit is contained in:
Loic d'Anterroches 2009-06-09 18:03:40 +02:00
parent 2f0156e63b
commit fb66e1e98f
2 changed files with 6 additions and 3 deletions

View File

@ -144,6 +144,9 @@ class IDF_Commit extends Pluf_Model
if ($r->count() > 0) { if ($r->count() > 0) {
return $r[0]; return $r[0];
} }
if (!isset($change->full_message)) {
$change->full_message = '';
}
$scm = IDF_Scm::get($project); $scm = IDF_Scm::get($project);
$commit = new IDF_Commit(); $commit = new IDF_Commit();
$commit->project = $project; $commit->project = $project;

View File

@ -407,10 +407,10 @@ class IDF_Scm_Svn extends IDF_Scm
$log = array(); $log = array();
$log['author'] = (string) $entry->author; $log['author'] = (string) $entry->author;
$log['date'] = gmdate('Y-m-d H:i:s', strtotime((string) $entry->date)); $log['date'] = gmdate('Y-m-d H:i:s', strtotime((string) $entry->date));
$log['title'] = (string) $entry->msg; $split = split("[\n\r]", (string) $entry->msg, 2);
$log['title'] = $split[0];
$log['commit'] = (string) $entry['revision']; $log['commit'] = (string) $entry['revision'];
$log['full_message'] = ''; $log['full_message'] = (isset($split[1])) ? trim($split[1]) : '';
$res[] = (object) $log; $res[] = (object) $log;
} }
return $res; return $res;