}
$message = possibly_foolish_untaint($message);
+ if (! length $message) {
+ $message = "no message given";
+ }
- my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "commit",
- "-m", "$message", "-u", "$user");
+ my @cmdline = ("hg", "-q", "-R", $config{srcdir}, "commit",
+ "-m", $message, "-u", $user);
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
* Renamed %oldpagemtime to a more accurately named %pagemtime and fix it to
actually store pages' mtimes.
* Add "mtime" sort parameter to inline plugin.
+ * Fix mercurial backend to deal with empty commit messages.
- -- Joey Hess <joeyh@debian.org> Fri, 23 Mar 2007 16:16:39 -0400
+ -- Joey Hess <joeyh@debian.org> Sat, 24 Mar 2007 11:14:10 -0400
ikiwiki (1.47) unstable; urgency=low
+ $message="web commit by Anonymous".(length $message ? ": $message" : "");
}
- $message = possibly_foolish_untaint($message);
\ No newline at end of file
+ $message = possibly_foolish_untaint($message);
+
+> The svn backend puts the user info in the message because that's the only
+> way to store the user info, unlike with mercurial. The svn plugin also
+> removes that info when getting the RecentChanges info. Since mercurial
+> does not do that, it seemed better to me to test for an empty message and
+> set it to a dummy commit string, which I've [[done]]. --[[Joey]]