src/main.cpp

changeset 36
e223879aa02a
parent 34
cc9d74d5eb46
child 37
d7e9a1200e21
equal deleted inserted replaced
35:d75805c1e3b9 36:e223879aa02a
239 } 239 }
240 proc.chdir(repo.path); 240 proc.chdir(repo.path);
241 if (repo.type == fm::HG) { 241 if (repo.type == fm::HG) {
242 proc.setbin(settings.hg); 242 proc.setbin(settings.hg);
243 if (proc.exec_log({"log", 243 if (proc.exec_log({"log",
244 "--date", std::format("{0}-01-01 to {0}-12-31", report_year), 244 "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year),
245 "--template", "{author}#{date|shortdate}\n"})) { 245 "--template", "{author}#{date|shortdate}\n"})) {
246 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); 246 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
247 return EXIT_FAILURE; 247 return EXIT_FAILURE;
248 } 248 }
249 heatmap.add(settings, proc.output()); 249 heatmap.add(settings, proc.output());
250 } else { 250 } else {
251 proc.setbin(settings.git); 251 proc.setbin(settings.git);
252 if (proc.exec_log({"log", 252 if (proc.exec_log({"log",
253 "--since", std::format("{0}-01-01", report_year), 253 "--since", std::format("{0}-01-01 00:00:00", report_year),
254 "--until", std::format("{0}-12-31", report_year), 254 "--until", std::format("{0}-12-31 23:59:59", report_year),
255 "--format=tformat:%an <%ae>#%cs"})) { 255 "--format=tformat:%an <%ae>#%cs"})) {
256 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); 256 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
257 return EXIT_FAILURE; 257 return EXIT_FAILURE;
258 } 258 }
259 heatmap.add(settings, proc.output()); 259 heatmap.add(settings, proc.output());

mercurial