All rcs backends need to implement rcs_remove
[ikiwiki.git] / IkiWiki / Rcs / svn.pm
index 6a822e896cd79951d3d0a4fdc1dd3e4a4e9c3b9e..6c15c2ca9b260bda8efd204d0be3d0a4b0f6c8af 100644 (file)
@@ -134,6 +134,23 @@ sub rcs_add ($) { #{{{
        }
 } #}}}
 
+sub rcs_remove ($) { #{{{
+       # filename is relative to the root of the srcdir
+       my $file=shift;
+
+       if (-d "$config{srcdir}/.svn") {
+               my $parent=dirname($file);
+               while (! -d "$config{srcdir}/$parent/.svn") {
+                       $file=$parent;
+                       $parent=dirname($file);
+               }
+               
+               if (system("svn", "rm", "--force", "--quiet", "$config{srcdir}/$file") != 0) {
+                       warn("svn rm failed\n");
+               }
+       }
+} #}}}
+
 sub rcs_recentchanges ($) { #{{{
        my $num=shift;
        my @ret;