[Bps-public-commit] smokingit branch, master, updated. d4843295baee50f969f9e044ca2926f01313a12d

Alex Vandiver alexmv at bestpractical.com
Fri Feb 4 17:06:57 EST 2011


The branch, master has been updated
       via  d4843295baee50f969f9e044ca2926f01313a12d (commit)
      from  adcd26a51d7512a29af780dfaa1ab479a0e58af9 (commit)

Summary of changes:
 lib/Smokingit/Model/Branch.pm |    2 +-
 lib/Smokingit/Model/Commit.pm |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit d4843295baee50f969f9e044ca2926f01313a12d
Author: Alex Vandiver <alex at chmrr.net>
Date:   Fri Feb 4 17:06:50 2011 -0500

    Deal more gracefully when we don't have enough historical commits already loaded

diff --git a/lib/Smokingit/Model/Branch.pm b/lib/Smokingit/Model/Branch.pm
index bb78e49..3fcfa69 100644
--- a/lib/Smokingit/Model/Branch.pm
+++ b/lib/Smokingit/Model/Branch.pm
@@ -163,7 +163,7 @@ sub commit_list {
     );
     my %commits;
     $commits{$_->sha} = $_ while $_ = $commits->next;
-    return map $commits{$_}, @revs;
+    return map $commits{$_} || $self->project->sha($_), @revs;
 }
 
 sub branchpoint {
diff --git a/lib/Smokingit/Model/Commit.pm b/lib/Smokingit/Model/Commit.pm
index bd65d71..fbaec35 100644
--- a/lib/Smokingit/Model/Commit.pm
+++ b/lib/Smokingit/Model/Commit.pm
@@ -90,8 +90,10 @@ sub run_smoke {
 sub hash_results {
     my $self = shift;
     my $results = $self->prefetched( "smoke_results" );
-    die "$self does not have smoke_results prefetched!"
-        unless $results;
+    unless ($results) {
+        warn "$self does not have smoke_results prefetched!\n";
+        return;
+    }
     $self->{results} = {};
     $self->{results}{$_->configuration->id} = $_
         for @{$results->items_array_ref};

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list