update for new rcs_commit_staged API
authorJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:56:50 +0000 (16:56 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:56:50 +0000 (16:56 -0400)
In the process, lost the commits from special usernames
when committing changed po files. Instead of trying to dummy up a session
object for the special username, I just don't pass one, and the commit will
appear to be from whatever user ikiwiki runs as.

IkiWiki/Plugin/po.pm

index 990847b488c33ff14c3f64c3064ae1e1d9a92268..86d5087f474f7be108239e3fe79f0c27506cd6e9 100644 (file)
@@ -429,8 +429,7 @@ sub change (@) {
 
        if ($updated_po_files) {
                commit_and_refresh(
-                       gettext("updated PO files"),
-                       "IkiWiki::Plugin::po::change");
+                       gettext("updated PO files"));
        }
 }
 
@@ -1035,17 +1034,18 @@ sub deletetranslations ($) {
 
        if (@todelete) {
                commit_and_refresh(
-                       gettext("removed obsolete PO files"),
-                       "IkiWiki::Plugin::po::deletetranslations");
+                       gettext("removed obsolete PO files"));
        }
 }
 
-sub commit_and_refresh ($$) {
-       my ($msg, $author) = (shift, shift);
+sub commit_and_refresh ($) {
+       my $msg = shift;
 
        if ($config{rcs}) {
                IkiWiki::disable_commit_hook();
-               IkiWiki::rcs_commit_staged($msg, $author, "127.0.0.1");
+               IkiWiki::rcs_commit_staged(
+                       message => $msg,
+               );
                IkiWiki::enable_commit_hook();
                IkiWiki::rcs_update();
        }