[Bps-public-commit] r12240 -

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon May 12 06:43:26 EDT 2008


Author: sunnavy
Date: Mon May 12 06:43:25 2008
New Revision: 12240

Modified:
   /   (props changed)
   Shipwright/trunk/lib/Shipwright/Backend/SVN.pm

Log:
 r12245 at sunnavys-mb:  sunnavy | 2008-05-12 15:34:08 +0800
 added check_repository for svn


Modified: Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	Mon May 12 06:43:25 2008
@@ -593,6 +593,32 @@
     return $out;
 }
 
+=head2 check_repository
+
+=cut
+
+sub check_repository {
+    my $self = shift;
+    my %args = @_;
+
+    if ( $args{action} eq 'create' ) {
+
+            my $info = $self->info;
+
+            return 1 if $info;
+
+    }
+    else {
+
+        # every valid shipwright repo has 'shipwright' subdir;
+        my $info = $self->info( path => 'shipwright' );
+        return 1 if $info;
+
+    }
+
+    return 0;
+}
+
 1;
 
 __END__



More information about the Bps-public-commit mailing list