INN commit: trunk/frontends (pullnews.in)

INN Commit rra at isc.org
Fri Aug 22 22:18:28 UTC 2014


    Date: Friday, August 22, 2014 @ 15:18:28
  Author: iulius
Revision: 9653

pullnews:  improve wording

* When pullnews runs for the first time against a newsgroup, say "never"
instead of January, 1st 1970 as the last run date.
* Improve spaces, uppercase characters and singular forms when 1 article
is retrieved.
* Update the config file even when the group is empty.

Modified:
  trunk/frontends/pullnews.in

-------------+
 pullnews.in |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Modified: pullnews.in
===================================================================
--- pullnews.in	2014-08-22 21:38:40 UTC (rev 9652)
+++ pullnews.in	2014-08-22 22:18:28 UTC (rev 9653)
@@ -625,9 +625,10 @@
 
     if (not $quiet) {
         printf LOG "\n%s:\n", $name;
-        printf LOG "\tlast checked: %s\n", scalar(localtime($prevDate));
-        printf LOG "\t%d articles available.  First %d Last %d\n",
-               $narticles, $first, $last;
+        printf LOG "\tLast checked: %s\n",
+            $prevDate ? scalar(localtime($prevDate)) : "never";
+        printf LOG "\t%d article%s available (first %d, last %d)\n",
+               $narticles, $narticles != 1 ? "s" : "", $first, $last;
     }
     if (defined $watermark) {
         printf LOG "\tOur previous highest: %d\n", $prevHigh if not $quiet;
@@ -641,6 +642,8 @@
     return 0 if ! $name;
     if ($narticles == 0) {
         print LOG " (nothing to get)\n" unless $quiet;
+        # Just update the time; keep the last known high watermark.
+        $shash->{$group} = [ time, $high ];
         return 1;
     }
 



More information about the inn-committers mailing list