[Bps-public-commit] r14989 - in Shipwright/branches/2.0: lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 11 06:02:36 EDT 2008


Author: sunnavy
Date: Mon Aug 11 06:02:33 2008
New Revision: 14989

Modified:
   Shipwright/branches/2.0/   (props changed)
   Shipwright/branches/2.0/lib/Shipwright/Source/Shipwright.pm

Log:
 r15456 at sunnavys-mb:  sunnavy | 2008-08-11 15:44:27 +0800
 the shipwright source can have branch support too


Modified: Shipwright/branches/2.0/lib/Shipwright/Source/Shipwright.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Source/Shipwright.pm	(original)
+++ Shipwright/branches/2.0/lib/Shipwright/Source/Shipwright.pm	Mon Aug 11 06:02:33 2008
@@ -20,10 +20,18 @@
     my $source_shipwright = Shipwright->new( repository => $base );
     $self->name( $dist ) unless $self->name;
 
-    $source_shipwright->backend->export(
-        target => File::Spec->catfile( $self->directory, $self->name ),
-        path   => "/dists/$dist",
-    );
+    if ( $source_shipwright->backend->has_branch_support ) {
+        $source_shipwright->backend->export(
+            target => File::Spec->catfile( $self->directory, $self->name ),
+            path   => "/sources/$dist",
+        );
+    }
+    else {
+        $source_shipwright->backend->export(
+            target => File::Spec->catfile( $self->directory, $self->name ),
+            path   => "/dists/$dist",
+        );
+    }
 
     $source_shipwright->backend->export(
         target => File::Spec->catfile( $self->scripts_directory, $self->name ),



More information about the Bps-public-commit mailing list