[Bps-public-commit] Shipwright branch, master, updated. 62d45445f9b355798fc0beef8973dc0cb6f873a1
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Dec 9 22:55:22 EST 2009
The branch, master has been updated
via 62d45445f9b355798fc0beef8973dc0cb6f873a1 (commit)
from 07aeb5eb5e10b9fc00a28942124040c96c93cefa (commit)
Summary of changes:
lib/Shipwright/Backend/Base.pm | 14 ++------------
lib/Shipwright/Backend/Git.pm | 3 ++-
lib/Shipwright/Backend/SVN.pm | 1 +
3 files changed, 5 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit 62d45445f9b355798fc0beef8973dc0cb6f873a1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Dec 10 11:54:29 2009 +0800
local_dir now only returns local_dir, no implicitly creation is done
diff --git a/lib/Shipwright/Backend/Base.pm b/lib/Shipwright/Backend/Base.pm
index 225873a..2ee01f7 100644
--- a/lib/Shipwright/Backend/Base.pm
+++ b/lib/Shipwright/Backend/Base.pm
@@ -37,7 +37,7 @@ the constructor
sub new {
my $proto = shift;
my $self = bless {@_}, ref $proto || $proto;
- return $self->build;
+ return $self->build(@_);
}
=item build
@@ -902,18 +902,8 @@ sub local_dir {
$repo =~ s/:/-/g;
$repo =~ s![/\\]!_!g;
my $target = catdir( $base_dir, $repo );
-
-# if explicitly defined $need_init, we should do exactly what it asks
-# else, if the $target is not existed yet, we do the init thing
- if ( defined $need_init ) {
- if ( $need_init ) {
- $self->_initialize_local_dir;
- }
- }
- elsif ( !-e $target ) {
- $self->_initialize_local_dir;
- }
return $target;
+
}
=item strip_repository
diff --git a/lib/Shipwright/Backend/Git.pm b/lib/Shipwright/Backend/Git.pm
index 80238f3..34547b6 100644
--- a/lib/Shipwright/Backend/Git.pm
+++ b/lib/Shipwright/Backend/Git.pm
@@ -47,7 +47,7 @@ for Shipwright L<repository|Shipwright::Manual::Glossary/repository>.
sub build {
my $self = shift;
$self->strip_repository
- if $self->repository =~ m{^git:[a-z]+(?:\+[a-z]+)?://};
+ if $self->repository =~ m{^git:[a-z]+(?:\+[a-z]+)?://};
$self->SUPER::build(@_);
}
@@ -69,6 +69,7 @@ sub initialize {
Shipwright::Util->run( sub { make_path( $path ) } );
$self->_init_new_git_repos( $path );
+ $self->_initialize_local_dir();
rcopy( $dir, $self->local_dir )
or confess "can't copy $dir to $path: $!";
diff --git a/lib/Shipwright/Backend/SVN.pm b/lib/Shipwright/Backend/SVN.pm
index d622555..4674c7f 100644
--- a/lib/Shipwright/Backend/SVN.pm
+++ b/lib/Shipwright/Backend/SVN.pm
@@ -67,6 +67,7 @@ sub initialize {
_initialize => 1,
comment => 'created project',
);
+ $self->_initialize_local_dir();
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list