]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Rcs/monotone.pm
web commit by JonasSmedegaard: Linkify 2nd patch.
[git.ikiwiki.info.git] / IkiWiki / Rcs / monotone.pm
index be6b36c66e4816f67875d51caba86f49f3582bd3..5717e004342875e97259cc09fe22b77f7b981810 100644 (file)
@@ -239,14 +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.
-               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.
@@ -314,8 +311,6 @@ sub rcs_commit ($$$;$$) { #{{{
                                                "Please use the non-web interface to resolve the conflicts.");
                                }
                                
-                               # suspend this revision because it has
-                               # conflict markers...
                                if (system("mtn", "--root=$config{mtnrootdir}",
                                           "update", "-r", $mergeResult) != 0) {
                                        debug("Unable to update to rev $mergeResult after conflict-enhanced merge on conflicted commit!");
@@ -363,7 +358,7 @@ sub rcs_add ($) { #{{{
        check_config();
 
        if (system("mtn", "--root=$config{mtnrootdir}", "add", "--quiet",
-                  "$config{srcdir}/$file") != 0) {
+                  $file) != 0) {
                error("Monotone add failed");
        }
 } #}}}