]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/svn.pm
typos
[ikiwiki.git] / IkiWiki / Rcs / svn.pm
index ea193e08f33418ab7be3f91819fade367dda7092..6c15c2ca9b260bda8efd204d0be3d0a4b0f6c8af 100644 (file)
@@ -1,12 +1,12 @@
 #!/usr/bin/perl
 
+package IkiWiki::Rcs::svn;
+
 use warnings;
 use strict;
 use IkiWiki;
 use POSIX qw(setlocale LC_CTYPE);
 
-package IkiWiki::Rcs::svn;
-
 sub import { #{{{
        if (exists $IkiWiki::config{svnpath}) {
                # code depends on the path not having extraneous slashes
@@ -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;