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

Alex Vandiver alexmv at bestpractical.com
Tue Feb 15 13:51:27 EST 2011


The branch, master has been updated
       via  8bd595caddcb09118ef93f02df593972fa3b6f16 (commit)
      from  a41d3439b06b21eed5e7bc442928b6ae6efb0ff5 (commit)

Summary of changes:
 lib/Smokingit/View/Project.pm |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 8bd595caddcb09118ef93f02df593972fa3b6f16
Author: Alex Vandiver <alex at chmrr.net>
Date:   Tue Feb 15 13:51:24 2011 -0500

    Cooking reformats for releng status having sub-branches

diff --git a/lib/Smokingit/View/Project.pm b/lib/Smokingit/View/Project.pm
index 9c875e7..7b1d4a5 100644
--- a/lib/Smokingit/View/Project.pm
+++ b/lib/Smokingit/View/Project.pm
@@ -164,23 +164,30 @@ template '/cooking.txt' => sub {
     $out .= "What's cooking in ".get('project')->name . ".git\n";
     $out .= ("-" x (length($out) - 1)) . "\n\n";
 
-    my $trunks = get('project')->trunks;
+    my $trunks = get('project')->trunk_or_relengs;
     while (my $t = $trunks->next) {
         $out .= $t->name." - " . $t->current_commit->long_status . "\n";
+        $out .= Text::Wrap::wrap(" "x 4," "x 4,$t->long_status)."\n\n"
+            if $t->long_status;
 
         my $sub = $t->branches;
-        $sub->order_by({column => "owner"}, {column => "name"});
+        $sub->limit( column => "status", operator => "!=", value => "releng", entry_aggregator => "AND");
+        $sub->order_by(
+            { function => "status = 'releng'", order => "desc"},
+            { column   => "owner" },
+            { column   => "name" },
+        );
         while ($b = $sub->next) {
             $out .= " "x 4 . $b->name." - ".$b->owner . "\n";
             $out .= " "x 6 . "[ " . $b->current_commit->long_status;
             $out .= " - " . $b->display_status;
             $out .= " by ". $b->review_by if $b->status eq "needs-review" and $b->review_by;
             $out .= " ]\n";
-            my $long = Text::Wrap::wrap(" "x 8," "x 8,$b->long_status);
-            $long .= "\n" if length $long;
-            $out .=  "$long\n";
+            $out .= Text::Wrap::wrap(" "x 8," "x 8,$b->long_status)."\n"
+                if $b->long_status;
+            $out .=  "\n";
         }
-        $out .= "\n";
+        $out .= "\n" if not $t->long_status and not $sub->count;
     }
     outs_raw( $out );
 };

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



More information about the Bps-public-commit mailing list