[Bps-public-commit] r15006 - in Shipwright/branches/2.0: lib/Shipwright/Script
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Aug 11 12:23:17 EDT 2008
Author: sunnavy
Date: Mon Aug 11 12:23:17 2008
New Revision: 15006
Modified:
Shipwright/branches/2.0/ (props changed)
Shipwright/branches/2.0/lib/Shipwright/Script/Import.pm
Log:
r15555 at sunnavys-mb: sunnavy | 2008-08-12 00:20:11 +0800
when import from shipwright source, supply branches arg
Modified: Shipwright/branches/2.0/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/branches/2.0/lib/Shipwright/Script/Import.pm (original)
+++ Shipwright/branches/2.0/lib/Shipwright/Script/Import.pm Mon Aug 11 12:23:17 2008
@@ -137,6 +137,7 @@
$script_dir = File::Spec->catdir( $base, '__scripts', $name );
}
else {
+
# Source part doesn't have script stuff, so we need to create by ourselves.
$script_dir = tempdir( CLEANUP => 1 );
@@ -161,13 +162,18 @@
}
}
+ my $branches =
+ Shipwright::Util::LoadFile( $shipwright->source->branches_path );
+
$shipwright->backend->import(
source => $source,
comment => $self->comment || 'import ' . $source,
- overwrite => 1, # import anyway for the main dist
+ overwrite => 1, # import anyway for the main dist
version => $version->{$name},
as => $self->as,
+ branches => $branches->{$name},
);
+
$shipwright->backend->import(
source => $source,
comment => 'import scripts for' . $source,
@@ -199,10 +205,10 @@
# _import_req: import required dists for a dist
sub _import_req {
- my $self = shift;
- my $source = shift;
- my $shipwright = shift;
- my $script_dir = shift;
+ my $self = shift;
+ my $source = shift;
+ my $shipwright = shift;
+ my $script_dir = shift;
my $require_file = File::Spec->catfile( $source, '__require.yml' );
$require_file = File::Spec->catfile( $script_dir, 'require.yml' )
@@ -263,11 +269,14 @@
$self->_import_req( $s, $shipwright, $script_dir );
+ my $branches = Shipwright::Util::LoadFile(
+ $shipwright->source->branches_path );
$shipwright->backend->import(
comment => 'deps for ' . $source,
source => $s,
overwrite => $self->overwrite,
version => $version->{$dist},
+ branches => $branches->{$dist},
);
$shipwright->backend->import(
source => $s,
More information about the Bps-public-commit
mailing list