]> git.donarmstrong.com Git - debbugs.git/commitdiff
handle quick bug loading by checking the database for the last modified time
authorDon Armstrong <don@donarmstrong.com>
Sat, 16 Aug 2014 21:14:45 +0000 (14:14 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sat, 16 Aug 2014 21:14:45 +0000 (14:14 -0700)
bin/debbugs-loadsql

index e6e1ac621a1fab7efa20b8c25ea61a94931b5ea3..2edcd1ec32f4c9fd4f74c948e7145f3ce0958b87 100755 (executable)
@@ -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 {