]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/svn.pm
* Corrected a bum regexp in openid munging.
[ikiwiki.git] / IkiWiki / Rcs / svn.pm
index fbf6b2c9ecc7be2556afe95cfa0ab11216731734..30020c1fcc23958c9ad4a25fb8b5bb5ac123ca2e 100644 (file)
@@ -60,13 +60,22 @@ sub rcs_prepedit ($) { #{{{
        }
 } #}}}
 
-sub rcs_commit ($$$) { #{{{
+sub rcs_commit ($$$;$$) { #{{{
        # Tries to commit the page; returns undef on _success_ and
        # a version of the page with the rcs's conflict markers on failure.
        # The file is relative to the srcdir.
        my $file=shift;
        my $message=shift;
        my $rcstoken=shift;
+       my $user=shift;
+       my $ipaddr=shift;
+
+       if (defined $user) {
+               $message="web commit by $user".(length $message ? ": $message" : "");
+       }
+       elsif (defined $ipaddr) {
+               $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+       }
 
        if (-d "$config{srcdir}/.svn") {
                # Check to see if the page has been changed by someone
@@ -122,7 +131,6 @@ sub rcs_recentchanges ($) { #{{{
 
        eval q{
                use Date::Parse;
-               use Time::Duration;
                use XML::SAX;
                use XML::Simple;
        };
@@ -195,7 +203,7 @@ sub rcs_recentchanges ($) { #{{{
 
 sub rcs_notify () { #{{{
        if (! exists $ENV{REV}) {
-               error("REV is not set, not running from svn post-commit hook, cannot send notifications");
+               error(gettext("REV is not set, not running from svn post-commit hook, cannot send notifications"));
        }
        my $rev=int(possibly_foolish_untaint($ENV{REV}));