$db = new Database();
$idx = $db->getIndexer();
-//cleanup
-echo "Deleting all index data\n";
-$idx->deleteAllRepos();
-
//create mapping
-echo "Index setup\n";
-$db->getSetup()->setup();
+echo "Index reset\n";
+$db->getSetup()->reset();
$rs = new Repositories();
list($repos, $count) = $rs->getList(0, 10000);
foreach ($repos as $repo) {
echo 'Indexing ' . $repo->id . "\n";
- $idx->addRepo($repo, filectime($repo->gitDir));
+ $commits = $repo->getHistory();
+ $first = count($commits)-1;
+ $idx->addRepo($repo, $commits[$first]->committerTime, $commits[0]->committerTime);
}
?>