fix new-line not being escaped in hg template (it still worked somehow)

Sun, 10 Aug 2025 11:57:05 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 10 Aug 2025 11:57:05 +0200
changeset 59
881ab7ae15a6
parent 58
f1093b290fbf
child 60
9b1cbc665851

fix new-line not being escaped in hg template (it still worked somehow)

src/main.cpp file | annotate | diff | comparison | revisions
--- a/src/main.cpp	Tue Jul 29 18:46:02 2025 +0200
+++ b/src/main.cpp	Sun Aug 10 11:57:05 2025 +0200
@@ -260,7 +260,7 @@
             proc.setbin(settings.hg);
             if (proc.exec_log({"log",
                 "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year),
-                "--template", "{author}#{date|shortdate}#{desc|firstline}\n"})) {
+                "--template", "{author}#{date|shortdate}#{desc|firstline}\\n"})) {
                 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
                 return EXIT_FAILURE;
             }

mercurial