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

sartak at bestpractical.com sartak at bestpractical.com
Thu Jul 30 14:23:08 EDT 2009


The branch, master has been updated
       via  0eb93a76aa1bbc654a53cfe01773366f36e52937 (commit)
      from  61c7ae1e6dd4d4a93798ae7595e0ce73da164113 (commit)

Summary of changes:
 bin/flip-changes |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 0eb93a76aa1bbc654a53cfe01773366f36e52937
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Jul 30 14:22:58 2009 -0400

    Improve robustness by bailing out if we can't create a change

diff --git a/bin/flip-changes b/bin/flip-changes
index b057486..fbea938 100644
--- a/bin/flip-changes
+++ b/bin/flip-changes
@@ -16,7 +16,7 @@ while (my $changelog = <$changelogs>) {
     my $changes = $changelog->changes;
     $changes->order_by(
         column => 'id',
-        order => 'desc',
+        order  => 'desc',
     );
 
     while (my $change = <$changes>) {
@@ -28,7 +28,7 @@ while (my $changelog = <$changelogs>) {
         );
         my ($ok, $msg) = $new_change->create(%values);
         if ($ok) { print '.' }
-        else { print "\nUnable to create change: $msg" }
+        else { print "\nUnable to create change: $msg. BAILING!\n"; exit }
 
         for my $collection ($change->votes, $change->rewordings, $change->importances) {
             while (my $record = <$collection>) {
@@ -41,7 +41,7 @@ while (my $changelog = <$changelogs>) {
 
         ($ok, $msg) = $change->delete;
         if ($ok) { print '.' }
-        else { print "\nUnable to delete change: $msg" }
+        else { print "\nUnable to delete change " . $change->id . ": $msg\n" }
     }
 }
 

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



More information about the Bps-public-commit mailing list