IDF_Scm_Monotone::getCommit() separate the first line of a commit from the

rest and write the rest in full_message - just like we do it for log and
everything else. This is ugly, really ugly, because it assumes something
on the format of a commit message, which might not be true at all for
some project, but this is something Loic has to decide (see also issue 491
and issue 535)
master
Thomas Keller 2010-09-28 21:37:26 +00:00
parent 617589f41b
commit eebdc5ad12
1 changed files with 4 additions and 2 deletions

View File

@ -623,10 +623,12 @@ class IDF_Scm_Monotone extends IDF_Scm
$dates[] = date('Y-m-d H:i:s', strtotime($date));
$res['date'] = implode(', ', $dates);
$res['title'] = implode("\n---\n", $certs['changelog']);
$combinedChangelog = implode("\n---\n", $certs['changelog']);
$split = preg_split("/[\n\r]/", $combinedChangelog, 2);
$res['title'] = $split[0];
$res['full_message'] = (isset($split[1])) ? trim($split[1]) : '';
$res['commit'] = $revs[0];
$res['changes'] = ($getdiff) ? $this->_getDiff($revs[0]) : '';
return (object) $res;