]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/monotone.pm
* prettydate,ddate: Don't ignore time formats passed to displaytime
[ikiwiki.git] / IkiWiki / Rcs / monotone.pm
index 992065931daf293acad0dda7814d05006d1f644a..b48ac92dbfa22c6adc16cfee00c83aacceb8617b 100644 (file)
@@ -239,17 +239,11 @@ sub rcs_commit ($$$;$$) { #{{{
 
                # Something has been committed, has this file changed?
                my ($out, $err);
-               #$automator->setOpts("-r", $oldrev, "-r", $rev);
-               #my ($out, $err) = $automator->call("content_diff", $file);
-               #debug("Problem committing $file") if ($err ne "");
-               # FIXME: use of $file in these backticks is not wise from a
-               # security POV. Probably safe, but should be avoided
-               # anyway.
-               # At the moment the backticks are used because the above call using the automate
-               # interface was failing.  When that bug in monotone is fixed, we should switch
-               # back.
-               my $diff = `mtn --root=$config{mtnrootdir} au content_diff -r $oldrev -r $rev $file`; # was just $out;
-
+               $automator->setOpts("r", $oldrev, "r", $rev);
+               ($out, $err) = $automator->call("content_diff", $file);
+               debug("Problem committing $file") if ($err ne "");
+               my $diff = $out;
+               
                if ($diff) {
                        # Commit a revision with just this file changed off
                        # the old revision.
@@ -422,7 +416,7 @@ sub rcs_recentchanges ($) { #{{{
                                                $committype = "monotone";
                                        }
                                } elsif ($cert->{name} eq "date") {
-                                       $when = time - str2time($cert->{value}, 'UTC');
+                                       $when = str2time($cert->{value}, 'UTC');
                                } elsif ($cert->{name} eq "changelog") {
                                        my $messageText = $cert->{value};
                                        # split the changelog into multiple