[Bps-public-commit] r14917 - in Shipwright/branches/2.0: lib/Shipwright/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Aug 8 08:01:55 EDT 2008


Author: sunnavy
Date: Fri Aug  8 08:01:54 2008
New Revision: 14917

Modified:
   Shipwright/branches/2.0/   (props changed)
   Shipwright/branches/2.0/lib/Shipwright/Backend/Base.pm
   Shipwright/branches/2.0/lib/Shipwright/Backend/FS.pm
   Shipwright/branches/2.0/lib/Shipwright/Backend/SVK.pm
   Shipwright/branches/2.0/lib/Shipwright/Backend/SVN.pm

Log:
 r15446 at sunnavys-mb:  sunnavy | 2008-08-08 17:35:39 +0800
 import to sources


Modified: Shipwright/branches/2.0/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/branches/2.0/lib/Shipwright/Backend/Base.pm	Fri Aug  8 08:01:54 2008
@@ -61,7 +61,7 @@
     dircopy( Shipwright::Util->share_root, $dir );
 
     # share_root can't keep empty dirs, we have to create them manually
-    for (qw/dists scripts t/) {
+    for (qw/dists scripts t sources/) {
         mkdir File::Spec->catfile( $dir, $_ );
     }
 
@@ -83,6 +83,7 @@
     my %args = @_;
     my $name = $args{source};
     $name =~ s{.*/}{};
+    $args{as} ||= 'vendor';
 
     unless ( $args{_initialize} || $args{_extra_tests} ) {
         if ( $args{_extra_tests} ) {
@@ -112,14 +113,14 @@
             }
         }
         else {
-            if ( $self->info( path => "/dists/$name" ) && not $args{overwrite} )
+            if ( $self->info( path => "/sources/$name/$args{as}" ) && not $args{overwrite} )
             {
                 $self->log->warn(
-"path dists/$name alreay exists, need to set overwrite arg to overwrite"
+"path sources/$name/$args{as} alreay exists, need to set overwrite arg to overwrite"
                 );
             }
             else {
-                $self->delete( path =>  "/dists/$name" ) if $args{delete};
+                $self->delete( path =>  "/sources/$name/$args{as}" ) if $args{delete};
                 $self->log->info(
                     "import $args{source} to " . $self->repository );
                 $self->_add_to_order($name);
@@ -556,7 +557,7 @@
     my $flags   = $self->flags   || {};
 
     for my $name (@names_to_trim) {
-        $self->delete( path => "/dists/$name" );
+        $self->delete( path => "/sources/$name" );
         $self->delete( path => "/scripts/$name" );
 
         # clean order.yml

Modified: Shipwright/branches/2.0/lib/Shipwright/Backend/FS.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Backend/FS.pm	(original)
+++ Shipwright/branches/2.0/lib/Shipwright/Backend/FS.pm	Fri Aug  8 08:01:54 2008
@@ -73,7 +73,8 @@
             else {
                 $cmd = [
                     'cp',          '-r',
-                    "$args{source}/", $self->repository . "/dists/$args{name}",
+                    "$args{source}/", $self->repository .
+                        "/sources/$args{name}/$args{as}",
                 ];
             }
         }

Modified: Shipwright/branches/2.0/lib/Shipwright/Backend/SVK.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Backend/SVK.pm	(original)
+++ Shipwright/branches/2.0/lib/Shipwright/Backend/SVK.pm	Fri Aug  8 08:01:54 2008
@@ -102,7 +102,8 @@
             else {
                 $cmd = [
                     'svk',         'import',
-                    $args{source}, $self->repository . "/dists/$args{name}",
+                    $args{source}, $self->repository .
+                        "/sources/$args{name}/$args{as}",
                     '-m',          q{'} . $args{comment} . q{'},
                 ];
             }

Modified: Shipwright/branches/2.0/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/branches/2.0/lib/Shipwright/Backend/SVN.pm	Fri Aug  8 08:01:54 2008
@@ -101,7 +101,8 @@
             else {
                 $cmd = [
                     'svn',         'import',
-                    $args{source}, $self->repository . "/dists/$args{name}",
+                    $args{source}, $self->repository .
+                        "/sources/$args{name}/$args{as}",
                     '-m',          q{'} . $args{comment} . q{'},
                 ];
             }



More information about the Bps-public-commit mailing list