From eebdc5ad1267683fc021d548ce1d211227514b06 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 28 Sep 2010 21:37:26 +0000 Subject: [PATCH] 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) --- src/IDF/Scm/Monotone.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/IDF/Scm/Monotone.php b/src/IDF/Scm/Monotone.php index 682d317..70924d2 100644 --- a/src/IDF/Scm/Monotone.php +++ b/src/IDF/Scm/Monotone.php @@ -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;