src/main.cpp

changeset 61
d77763d2fdda
parent 59
881ab7ae15a6
equal deleted inserted replaced
60:9b1cbc665851 61:d77763d2fdda
258 proc.chdir(repo.path); 258 proc.chdir(repo.path);
259 if (repo.type == fm::HG) { 259 if (repo.type == fm::HG) {
260 proc.setbin(settings.hg); 260 proc.setbin(settings.hg);
261 if (proc.exec_log({"log", 261 if (proc.exec_log({"log",
262 "--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),
263 "--template", "{author}#{date|shortdate}#{desc|firstline}\\n"})) { 263 "--template", "{author}#{date|shortdate}#{tags}#{desc|firstline}\\n"})) {
264 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); 264 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
265 return EXIT_FAILURE; 265 return EXIT_FAILURE;
266 } 266 }
267 heatmap.add(settings, proc.output()); 267 heatmap.add(settings, proc.output());
268 } else { 268 } else {
269 proc.setbin(settings.git); 269 proc.setbin(settings.git);
270 if (proc.exec_log({"log", 270 if (proc.exec_log({"log",
271 "--decorate=short",
272 "--decorate-refs=refs/tags/",
271 "--since", std::format("{0}-01-01 00:00:00", report_year), 273 "--since", std::format("{0}-01-01 00:00:00", report_year),
272 "--until", std::format("{0}-12-31 23:59:59", report_year), 274 "--until", std::format("{0}-12-31 23:59:59", report_year),
273 "--format=tformat:%an <%ae>#%cs#%s"})) { 275 "--format=tformat:%an <%ae>#%cs#%(decorate:prefix=,suffix=,tag=,separator= )#%s"})) {
274 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); 276 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
275 return EXIT_FAILURE; 277 return EXIT_FAILURE;
276 } 278 }
277 heatmap.add(settings, proc.output()); 279 heatmap.add(settings, proc.output());
278 } 280 }

mercurial