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".
This commit is contained in:
Thomas Keller 2010-09-15 08:46:10 +00:00
parent 42936cc51d
commit 29b8bf8a4e

View File

@ -680,11 +680,18 @@ class IDF_Scm_Monotone extends IDF_Scm
// read in the initial branches we should follow // read in the initial branches we should follow
if (count($initialBranches) == 0) { 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']; $initialBranches = $certs['branch'];
} }
// only add it to our log if it is on one of the initial branches // 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; --$n;
$log = array(); $log = array();