[Bps-public-commit] r15355 - in Shipwright/branches/1.10: lib/Shipwright/Script share/bin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Aug 21 23:08:33 EDT 2008
Author: sunnavy
Date: Thu Aug 21 23:08:33 2008
New Revision: 15355
Modified:
Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm
Shipwright/branches/1.10/lib/Shipwright/Test.pm
Shipwright/branches/1.10/lib/Shipwright/Util.pm
Shipwright/branches/1.10/share/bin/shipwright-builder
Log:
merged 15354 to 1.1
Modified: Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm Thu Aug 21 23:08:33 2008
@@ -38,7 +38,7 @@
if ( $self->install_base ) {
# convert relative path to be absolute
- $self->install_base( rel2abs( $self->install_base ) );
+ $self->install_base( abs_path( $self->install_base ) );
}
unless ( $self->name ) {
Modified: Shipwright/branches/1.10/lib/Shipwright/Test.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Test.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Test.pm Thu Aug 21 23:08:33 2008
@@ -29,7 +29,7 @@
sub has_svk {
if ( can_run('svk') && can_run('svnadmin') ) {
- my $out = Shipwright::Util->run(['svk', '--version'], 1);
+ my $out = Shipwright::Util->run( [ 'svk', '--version' ], 1 );
if ( $out && $out =~ /version v(\d)\./i ) {
return 1 if $1 >= 2;
}
@@ -46,7 +46,7 @@
sub has_svn {
if ( can_run('svn') && can_run('svnadmin') ) {
- my $out = Shipwright::Util->run(['svn', '--version'], 1);
+ my $out = Shipwright::Util->run( [ 'svn', '--version' ], 1 );
if ( $out && $out =~ /version 1\.(\d)/i ) {
return 1 if $1 >= 4;
}
@@ -61,7 +61,7 @@
=cut
sub create_fs_repo {
- return tempdir( 'shipwright_XXXXXX', CLEANUP => 1 , TMPDIR => 1);
+ return tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
}
=head2 create_svk_repo
@@ -72,7 +72,7 @@
=cut
sub create_svk_repo {
- $ENV{SVKROOT} = tempdir( 'shipwright_XXXXXX', CLEANUP => 1 , TMPDIR => 1);
+ $ENV{SVKROOT} = tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
my $svk_root_local = catfile( $ENV{SVKROOT}, 'local' );
system("svnadmin create $svk_root_local");
system("svk depotmap -i");
@@ -87,7 +87,7 @@
=cut
sub create_svn_repo {
- my $repo = tempdir( 'shipwright_XXXXXX', CLEANUP => 1 , TMPDIR => 1);
+ my $repo = tempdir( 'shipwright_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
system("svnadmin create $repo") && die "create repo failed: $!";
return "file://$repo";
}
@@ -149,7 +149,7 @@
require Test::More;
my ( $out, $err ) = Shipwright::Util->run( $cmd, 1 ); # ingnore failure
- _test_cmd( $out, $exp, $msg ) if defined $exp;
+ _test_cmd( $out, $exp, $msg ) if defined $exp;
_test_cmd( $err, $exp_err, $msg_err ) if defined $exp_err;
}
Modified: Shipwright/branches/1.10/lib/Shipwright/Util.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Util.pm (original)
+++ Shipwright/branches/1.10/lib/Shipwright/Util.pm Thu Aug 21 23:08:33 2008
@@ -4,8 +4,9 @@
use strict;
use Carp;
use IPC::Run3;
-use File::Spec::Functions qw/catfile catdir splitpath splitdir rel2abs/;
+use File::Spec::Functions qw/catfile catdir splitpath splitdir/;
use File::Temp qw/tempdir/;
+use Cwd qw/abs_path/;
use Shipwright; # we need this to find where Shipwright.pm lives
@@ -88,7 +89,7 @@
unless ($SHIPWRIGHT_ROOT) {
my $dir = ( splitpath( $INC{"Shipwright.pm"} ) )[1];
- $SHIPWRIGHT_ROOT = rel2abs($dir);
+ $SHIPWRIGHT_ROOT = abs_path($dir);
}
return ($SHIPWRIGHT_ROOT);
@@ -106,7 +107,7 @@
require File::ShareDir;
$SHARE_ROOT ||=
- eval { rel2abs( File::ShareDir::module_dir('Shipwright') ) };
+ eval { abs_path( File::ShareDir::module_dir('Shipwright') ) };
unless ( $SHARE_ROOT ) {
Modified: Shipwright/branches/1.10/share/bin/shipwright-builder
==============================================================================
--- Shipwright/branches/1.10/share/bin/shipwright-builder (original)
+++ Shipwright/branches/1.10/share/bin/shipwright-builder Thu Aug 21 23:08:33 2008
@@ -2,7 +2,7 @@
use warnings;
use strict;
-use File::Spec::Functions qw/catfile catdir splitdir rel2abs/;
+use File::Spec::Functions qw/catfile catdir splitdir/;
use File::Temp qw/tempdir/;
use File::Copy qw/move copy/;
use File::Find qw/find/;
@@ -127,7 +127,7 @@
$installed = YAML::Tiny->new;
}
-$args{'install-base'} = rel2abs( $args{'install-base'} );
+$args{'install-base'} = abs_path( $args{'install-base'} );
# YAML::Tiny objects are array based.
my $order =
More information about the Bps-public-commit
mailing list