]> git.donarmstrong.com Git - debbugs.git/blobdiff - bin/debbugs-loadsql
import uniq from List::MoreUtils into updatesqlcache
[debbugs.git] / bin / debbugs-loadsql
index 6a159feec59a63ab70dcb3ead1d4eaa473b4c67a..c583af03a44c8526a1965b5a5eb2aa56d67a9073 100755 (executable)
@@ -299,7 +299,7 @@ sub add_bugs {
                       next;
                    }
                    my $rs = $s->resultset('Bug')->search({id=>$bug})->single();
-                   next if defined $rs and $stat->mtime < $rs->last_modified()->epoch();
+                   next if defined $rs and $stat->mtime <= $rs->last_modified()->epoch();
                    push @bugs_to_update, $bug;
                   }
                } else {
@@ -307,7 +307,7 @@ sub add_bugs {
                }
                eval {
                  $s->txn_do(sub {
-                              for my $bug (@bugs) {
+                              for my $bug (@bugs_to_update) {
                                 load_bug(db => $s,
                                          bug => $bug,
                                          tags => \%tags,
@@ -569,7 +569,7 @@ sub add_logs {
                   }
                   if ($options{quick}) {
                       my $rs = $s->resultset('Bug')->search({bug=>$bug})->single();
-                      next if defined $rs and $stat->mtime < $rs->last_modified()->epoch();
+                      next if defined $rs and $stat->mtime <= $rs->last_modified()->epoch();
                   }
                   eval {
                       load_bug_log(db => $s,