[Bps-public-commit] App-Changeloggr branch, master, updated. a0a2bc74cc45d4094fc84bc3830eaf33cd4a3894

sartak at bestpractical.com sartak at bestpractical.com
Mon Mar 30 14:16:25 EDT 2009


The branch, master has been updated
       via  a0a2bc74cc45d4094fc84bc3830eaf33cd4a3894 (commit)
      from  36ab0faa6cb6c4a1640810b8d0028c80c1eb8847 (commit)

Summary of changes:
 lib/App/Changeloggr/Action/AddChanges.pm |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit a0a2bc74cc45d4094fc84bc3830eaf33cd4a3894
Author: Shawn M Moore <sartak at gmail.com>
Date:   Mon Mar 30 14:16:12 2009 -0400

    Indicate how many changes were added in the action result

diff --git a/lib/App/Changeloggr/Action/AddChanges.pm b/lib/App/Changeloggr/Action/AddChanges.pm
index e615ec0..792ac0b 100644
--- a/lib/App/Changeloggr/Action/AddChanges.pm
+++ b/lib/App/Changeloggr/Action/AddChanges.pm
@@ -45,9 +45,14 @@ sub take_action {
     my $self = shift;
     my $changelog = $self->get_changelog;
 
-    $changelog->parse_and_add_changes($self->argument_value('changes'));
+    my $changes = $changelog->parse_and_add_changes($self->argument_value('changes'));
 
-    $self->result->message("Added your changes!");
+    if ($changes->count) {
+        $self->result->message("Added your [quant,_1,change]!", $changes->count);
+    }
+    else {
+        $self->result->message("No changes to add.");
+    }
 }
 
 1;

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



More information about the Bps-public-commit mailing list