From: Don Armstrong Date: Sat, 16 Aug 2014 21:14:45 +0000 (-0700) Subject: handle quick bug loading by checking the database for the last modified time X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=4d4422fcd44089edbda1cdaf2b0c6377bfc6f8d2 handle quick bug loading by checking the database for the last modified time --- diff --git a/bin/debbugs-loadsql b/bin/debbugs-loadsql index e6e1ac6..2edcd1e 100755 --- a/bin/debbugs-loadsql +++ b/bin/debbugs-loadsql @@ -252,7 +252,10 @@ sub add_bugs { print STDERR "Unable to stat $bug $!\n"; next; } - next if $stat->mtime < $time; + if ($options{quick}) { + my $rs = $s->resultset('Bug')->search({bug=>$bug})->single(); + next if defined $rs and $stat->mtime < $rs->last_modified()->epoch(); + } my $data = read_bug(bug => $bug, location => $initialdir); eval {