[Bps-public-commit] r13600 - in Shipwright/trunk: lib/Shipwright/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jun 25 20:15:27 EDT 2008


Author: sunnavy
Date: Wed Jun 25 20:14:21 2008
New Revision: 13600

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

Log:
 r13790 at sunnavys-mb:  sunnavy | 2008-06-26 00:16:51 +0800
 fixed bugs in _fill_deps


Modified: Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	Wed Jun 25 20:14:21 2008
@@ -8,6 +8,7 @@
 use File::Temp qw/tempdir/;
 use File::Copy qw/copy/;
 use File::Copy::Recursive qw/dircopy/;
+use List::MoreUtils qw/uniq/;
 
 our %REQUIRE_OPTIONS = ( import => [qw/source/] );
 
@@ -331,6 +332,7 @@
     my $require = $args{require};
     my $name    = $args{name};
 
+    return if $require->{$name};
     my ($string) = Shipwright::Util->run(
         [ 'svk', 'cat', $self->repository . "/scripts/$name/require.yml" ], 1 );
     my $req = Shipwright::Util::Load($string) || {};
@@ -340,6 +342,7 @@
             push @{ $require->{$name} }, keys %{ $req->{$_} }
               if $args{"keep_$_"};
         }
+        @{ $require->{$name} } = uniq @{$require->{$name}};
     }
     else {
 
@@ -349,7 +352,7 @@
 
     for my $dep ( @{ $require->{$name} } ) {
         next if $require->{$dep};
-        $self->_fill_deps( %args, name => $dep );
+        $self->_fill_deps( %args, name => $dep, require => $require );
     }
 }
 

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	Wed Jun 25 20:14:21 2008
@@ -8,6 +8,7 @@
 use File::Temp qw/tempdir/;
 use File::Copy qw/copy/;
 use File::Copy::Recursive qw/dircopy/;
+use List::MoreUtils qw/uniq/;
 
 our %REQUIRE_OPTIONS = ( import => [qw/source/], );
 
@@ -326,6 +327,8 @@
     my $require = $args{require};
     my $name    = $args{name};
 
+    return if $require->{$name};
+
     my ($string) = Shipwright::Util->run(
         [ 'svn', 'cat', $self->repository . "/scripts/$_/require.yml" ], 1 );
 
@@ -336,6 +339,7 @@
             push @{ $require->{$name} }, keys %{ $req->{$_} }
               if $args{"keep_$_"};
         }
+        @{ $require->{$name} } = uniq @{$require->{$name}};
     }
     else {
 
@@ -345,7 +349,7 @@
 
     for my $dep ( @{ $require->{$name} } ) {
         next if $require->{$dep};
-        $self->_fill_deps( %args, name => $dep );
+        $self->_fill_deps( %args, name => $dep, require => $require );
     }
 }
 



More information about the Bps-public-commit mailing list