From fb023d276d8aa2d08de343a055105e143a717db0 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Tue, 22 Apr 2003 21:30:07 +0000 Subject: [PATCH] major fix in newsrc handling minor output changes --- trunk/ripnews/CHANGELOG | 5 ++++- trunk/ripnews/news/article.rb | 8 +++++++- trunk/ripnews/ripnews.rb | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/trunk/ripnews/CHANGELOG b/trunk/ripnews/CHANGELOG index a09a00e..f02b307 100644 --- a/trunk/ripnews/CHANGELOG +++ b/trunk/ripnews/CHANGELOG @@ -1,4 +1,4 @@ -# $Dwarf: CHANGELOG,v 1.15 2003/04/18 22:34:20 ward Exp $ +# $Dwarf: CHANGELOG,v 1.16 2003/04/20 20:42:58 ward Exp $ # $Source$ from 0.1.0 to ... @@ -6,6 +6,9 @@ from 0.1.0 to ... - code cleanups - split of uudecoding and ydecoding - add some regression tests + - various bug fixes + - remove articles from newsrc that aren't on the server any + longer from 0.0.9 to 0.1.0 - allow comments after continuing lines, like this: diff --git a/trunk/ripnews/news/article.rb b/trunk/ripnews/news/article.rb index d7287c6..c205172 100644 --- a/trunk/ripnews/news/article.rb +++ b/trunk/ripnews/news/article.rb @@ -1,6 +1,6 @@ ################################# # -# $Dwarf: article.rb,v 1.60 2003/04/20 16:34:40 ward Exp $ +# $Dwarf: article.rb,v 1.61 2003/04/20 18:39:13 ward Exp $ # $Source$ # # article.rb @@ -93,6 +93,12 @@ def get_articles(cachedir=false) if first <= last @connections[server]["first"] = first ? first : 0 @connections[server]["last"] = last ? last : 0 + print " Server: #{server}\n" + print " First: #{first}\n" + print " Last: #{last}\n" + # clean up old newsrc entries + @connections[server]["newsrc"].unmark_range(@group, 0, (@connections[server]["first"].to_i-1).to_s) + @connections[server]["newsrc"].save else print " First article has higher number than last article on server #{server}.\n" del_server(server) diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index f31bb10..63df641 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -1,6 +1,6 @@ #!/usr/local/bin/ruby -w -# $Dwarf: ripnews.rb,v 1.48 2003/04/20 20:41:10 ward Exp $ +# $Dwarf: ripnews.rb,v 1.49 2003/04/20 21:09:00 ward Exp $ # $Source$ require 'date' @@ -373,7 +373,7 @@ check_config @maxfilelength = get_max_file_length(@config[@config.keys[0]]["TEMPDIR"]) -print "$Id$\n" +print "$Id$\n\n" if Debuglevel > 2 @config.each_key{|i|