]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Fix mercurial backend to deal with empty commit messages.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 24 Mar 2007 15:14:53 +0000 (15:14 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 24 Mar 2007 15:14:53 +0000 (15:14 +0000)
IkiWiki/Rcs/mercurial.pm
debian/changelog
doc/bugs/Http_error_500_when_using_mercurial_backend.mdwn

index e4cc6deb376ead514c0f3f3b7be7ddb1057d6c5f..84bf99c687d95cd0f956343b0bffeca1bacfd13a 100644 (file)
@@ -79,9 +79,12 @@ sub rcs_commit ($$$;$$) { #{{{
        }
 
        $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: $!";
        }
index dda5aa78b08485b492dc3aab3c27b95115471570..dda6ccf585b2d12b5626cf2c2faec41994ed0cef 100644 (file)
@@ -15,8 +15,9 @@ ikiwiki (1.48) UNRELEASED; urgency=low
   * 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
 
index 5015b62903aec144d962f67609b615585806ccd2..db49f1e4a1d2c86db2ec9729dd50dbcf9b1ee095 100644 (file)
@@ -19,4 +19,10 @@ Here is a quick patch, partialy copying the svn backend.
     +          $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]]