From 29b8bf8a4e692f8407beb57aff81fd64a9d33459 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Wed, 15 Sep 2010 08:46:10 +0000 Subject: [PATCH] Some revisions might not carry a branch cert (yet), because they're part of another branch whose certs haven't been pushed into the server yet, so we need to skip these revisions while going back in time for the changelog. The initial revision however must carry a branch cert, otherwise we have nothing to "follow". --- src/IDF/Scm/Monotone.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/IDF/Scm/Monotone.php b/src/IDF/Scm/Monotone.php index a0b01c6..682d317 100644 --- a/src/IDF/Scm/Monotone.php +++ b/src/IDF/Scm/Monotone.php @@ -680,11 +680,18 @@ class IDF_Scm_Monotone extends IDF_Scm // read in the initial branches we should follow if (count($initialBranches) == 0) { + if (!isset($certs['branch'])) { + throw new IDF_Scm_Exception(sprintf( + __("revision %s has no branch cert - cannot start ". + "logging from this revision"), $rev + )); + } $initialBranches = $certs['branch']; } // only add it to our log if it is on one of the initial branches - if (count(array_intersect($initialBranches, $certs['branch'])) > 0) { + // ignore revisions without any branch certificate + if (count(array_intersect($initialBranches, (array)@$certs['branch'])) > 0) { --$n; $log = array();