In `status`, if last run is "empty", call it "good".
authorDavid E. Wheeler <david@justatheory.com>
Thu, 25 Jul 2013 15:33:03 +0000 (17:33 +0200)
committerDavid E. Wheeler <david@justatheory.com>
Thu, 25 Jul 2013 15:33:03 +0000 (17:33 +0200)
Two reasons for this:

* An empty run is not a failure, but "Empty" is kind of distracting
  in the output.
* It is useful, if you just kicked a sync, to see that it ran in the output of
  `status`, even if it was empty.

bucardo

diff --git a/bucardo b/bucardo
index 4a71c14e79581eeafe6a9fdce8ea1f755bd8ced7..b9c6f9daa63deebcc959b15282c3e9be1b9481f5 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -5178,6 +5178,11 @@ AND (   lastgood  IS TRUE
                 $max{state} = length($s->{state}) if length($s->{state}) > $max{state};
                 next;
             }
+            if ($wintype eq 'empty') {
+                # Empty is good, as far as status is concerned.
+                $s->{rowgood} = $s->{latestrow};
+                $wintype = 'good';
+            }
             $s->{state} = ucfirst $wintype;
         }