[Bps-public-commit] r10119 - bpsbuilder/BPB/lib/BPB/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Dec 25 11:47:32 EST 2007


Author: sunnavy
Date: Tue Dec 25 11:47:32 2007
New Revision: 10119

Modified:
   bpsbuilder/BPB/lib/BPB/Backend/SVK.pm

Log:
we'd better delete repository first when initiating

Modified: bpsbuilder/BPB/lib/BPB/Backend/SVK.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend/SVK.pm	(original)
+++ bpsbuilder/BPB/lib/BPB/Backend/SVK.pm	Tue Dec 25 11:47:32 2007
@@ -47,6 +47,7 @@
     print $builder $BPB::Backend::BUILDER;
     close $builder;
 
+    $self->delete; # clean repository in case it exists
     $self->import( source => $dir, _initialize => 1 );
 }
 
@@ -130,6 +131,10 @@
         $cmd = join ' ', 'svk', 'commit', '-m', q{'} . $args{comment} . q{'},
           $args{path};
     }
+    elsif ( $type eq 'delete' ) {
+        $cmd = join ' ', 'svk', 'delete', $self->repository, '-m', q{'} .
+            'delete repository' . q{'};
+    }
     else {
         croak "invalid command";
     }
@@ -176,6 +181,12 @@
     system($cmd );
 }
 
+sub delete {
+    my $self = shift;
+    my $cmd  = $self->_cmd( 'delete' );
+    $self->_run($cmd);
+}
+
 1;
 
 __END__



More information about the Bps-public-commit mailing list