]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Http_error_500_when_using_mercurial_backend.mdwn
Merge branch 'master' into po
[ikiwiki.git] / doc / bugs / Http_error_500_when_using_mercurial_backend.mdwn
1 This is [[done]]
2
3 The mercurial backend is broken when no changelog message is given.
4
5 Here is a quick patch, partialy copying the svn backend. 
6
7     --- /usr/share/perl5/IkiWiki/Rcs/mercurial.pm       2007-03-18 23:19:40.000000000 +0100
8     +++ ./mercurial.pm  2007-03-24 13:11:36.000000000 +0100
9     @@ -70,12 +70,15 @@
10      
11         if (defined $user) {
12                 $user = possibly_foolish_untaint($user);
13     +           $message="web commit by $user".(length $message ? ": $message" : "");
14         }
15         elsif (defined $ipaddr) {
16                 $user = "Anonymous from $ipaddr";
17     +           $message="web commit from $ipaddr".(length $message ? ": $message" : "");
18         }
19         else {
20                 $user = "Anonymous";
21     +           $message="web commit by Anonymous".(length $message ? ": $message" : "");
22         }
23      
24         $message = possibly_foolish_untaint($message);
25
26 > The svn backend puts the user info in the message because that's the only
27 > way to store the user info, unlike with mercurial. The svn plugin also
28 > removes that info when getting the RecentChanges info. Since mercurial
29 > does not do that, it seemed better to me to test for an empty message and
30 > set it to a dummy commit string, which I've [[bugs/done]]. --[[Joey]]
31 >>Thanks for the correct fix, Joey. --hb