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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jun 27 14:15:20 EDT 2008


Author: sunnavy
Date: Fri Jun 27 14:15:20 2008
New Revision: 13663

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

Log:
 r13898 at sunnavys-mb:  sunnavy | 2008-06-28 02:10:42 +0800
 bug fixes


Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Fri Jun 27 14:15:20 2008
@@ -209,6 +209,8 @@
         @dists = $self->dists;
     }
 
+    s{/$}{} for @dists;
+
     my $require = {};
 
     for (@dists) {
@@ -234,8 +236,10 @@
     my $name    = $args{name};
 
     return if $require->{$name};
-    my $req = Shipwright::Util::LoadFile(
-        $self->repository . "/scripts/$name/require.yml" );
+    my $out = Shipwright::Util->run(
+        $self->_cmd( 'cat', path => "/scripts/$name/require.yml" ), 1 );
+
+    my $req = Shipwright::Util::Load( $out ) || {};
 
     if ( $req->{requires} ) {
         for (qw/requires recommends build_requires/) {
@@ -391,7 +395,7 @@
 sub dists {
     my $self = shift;
     my %args = @_;
-    my $out  = $self->list( path => 'scripts' );
+    my $out  = $self->list( path => '/scripts' );
     return split /\s+/, $out;
 }
 

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	Fri Jun 27 14:15:20 2008
@@ -131,6 +131,9 @@
     elsif ( $type eq 'info' ) {
         $cmd = [ 'svk', 'info', join '/', $self->repository, $args{path} ];
     }
+    elsif ( $type eq 'cat' ) {
+        $cmd = [ 'svk', 'cat', join '/', $self->repository, $args{path} ];
+    }
     elsif ( $type eq 'propset' ) {
         $cmd = [
             'svk',                                'propset',

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	Fri Jun 27 14:15:20 2008
@@ -133,6 +133,9 @@
     elsif ( $type eq 'info' ) {
         $cmd = [ 'svn', 'info', join '/', $self->repository, $args{path} ];
     }
+    elsif ( $type eq 'cat' ) {
+        $cmd = [ 'svn', 'cat', join '/', $self->repository, $args{path} ];
+    }
     elsif ( $type eq 'propset' ) {
         $cmd = [
             'svn',       'propset',



More information about the Bps-public-commit mailing list