250 }; |
250 }; |
251 year_month_day report_begin{report_year, January, 1d}; |
251 year_month_day report_begin{report_year, January, 1d}; |
252 year_month_day report_end{report_year, December, 31d}; |
252 year_month_day report_end{report_year, December, 31d}; |
253 |
253 |
254 // read the commit logs |
254 // read the commit logs |
255 fm::heatmap heatmap; |
255 fm::heatmap heatmap{settings.separate}; |
256 for (auto &&repo : repos.list()) { |
256 for (auto &&repo : repos.list()) { |
257 if (settings.separate) { |
257 heatmap.set_repo(repo.name); |
258 heatmap.set_repo(repo.name); |
|
259 } |
|
260 proc.chdir(repo.path); |
258 proc.chdir(repo.path); |
261 if (repo.type == fm::HG) { |
259 if (repo.type == fm::HG) { |
262 proc.setbin(settings.hg); |
260 proc.setbin(settings.hg); |
263 if (proc.exec_log({"log", |
261 if (proc.exec_log({"log", |
264 "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year), |
262 "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year), |
323 // get the entry from the heatmap |
321 // get the entry from the heatmap |
324 auto find_result = entries.find(day_to_check); |
322 auto find_result = entries.find(day_to_check); |
325 if (find_result == entries.end()) { |
323 if (find_result == entries.end()) { |
326 html::cell(day_to_check); |
324 html::cell(day_to_check); |
327 } else { |
325 } else { |
328 html::cell(day_to_check, find_result->second); |
326 html::cell(day_to_check, settings.separate, find_result->second); |
329 } |
327 } |
330 // advance seven days and one column |
328 // advance seven days and one column |
331 day_to_check += days{7}; |
329 day_to_check += days{7}; |
332 column++; |
330 column++; |
333 } |
331 } |