]> sipb.mit.edu Git - ikiwiki.git/commitdiff
apply monotone patch
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 24 Aug 2007 01:20:25 +0000 (01:20 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 24 Aug 2007 01:20:25 +0000 (01:20 +0000)
IkiWiki/Rcs/monotone.pm
doc/bugs/Monotone_rcs_support.mdwn

index 992065931daf293acad0dda7814d05006d1f644a..5717e004342875e97259cc09fe22b77f7b981810 100644 (file)
@@ -239,17 +239,11 @@ sub rcs_commit ($$$;$$) { #{{{
 
                # Something has been committed, has this file changed?
                my ($out, $err);
 
                # 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.
                if ($diff) {
                        # Commit a revision with just this file changed off
                        # the old revision.
index 116939722184bc685fd251dedcec78d71f57a40b..d1ef00246cd7a97410da9886f33584baa484aa0e 100644 (file)
@@ -50,34 +50,7 @@ Here is another patch.  It fixes a FIXME you added.  I was using $file within ba
 I was getting an error trying to do it right.  I've figured out the error, and now do it right.  This
 should also speed things up (very slightly)
 
 I was getting an error trying to do it right.  I've figured out the error, and now do it right.  This
 should also speed things up (very slightly)
 
-    Index: IkiWiki/Rcs/monotone.pm
-    ===================================================================
-    --- IkiWiki/Rcs/monotone.pm        (revision 4234)
-    +++ IkiWiki/Rcs/monotone.pm        (working copy)
-    @@ -239,17 +239,11 @@
-     
-               # 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.
-
+> applied
 
 >> BTW, will all the monotone output parsing work if LANG != C?
 
 
 >> BTW, will all the monotone output parsing work if LANG != C?