[Bps-public-commit] Shipwright branch, master, updated. b7607a949d98dea12b52884e70165b3d3acb3550
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Apr 26 07:49:01 EDT 2009
The branch, master has been updated
via b7607a949d98dea12b52884e70165b3d3acb3550 (commit)
from 67a38e69827347597f82b9f709944204bd7d7c6b (commit)
Summary of changes:
lib/Shipwright/Backend/Git.pm | 44 +++++++++++++++++++++++++---------------
lib/Shipwright/Test.pm | 2 +-
2 files changed, 28 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit b7607a949d98dea12b52884e70165b3d3acb3550
Author: sunnavy <sunnavy at gmail.com>
Date: Sun Apr 26 19:48:36 2009 +0800
update pod
diff --git a/lib/Shipwright/Backend/Git.pm b/lib/Shipwright/Backend/Git.pm
index f1f2f21..54911a6 100644
--- a/lib/Shipwright/Backend/Git.pm
+++ b/lib/Shipwright/Backend/Git.pm
@@ -55,6 +55,14 @@ sub initialize {
chdir $cwd;
}
+=item cloned_dir
+
+since nearly all the time we need to clone first to use git, it's good that
+we keep a cloned dir.
+this returns the cloned_dir, will also clone if it's not cloned yet
+
+=cut
+
my $cloned_dir;
sub cloned_dir {
@@ -97,6 +105,13 @@ sub check_repository {
return;
}
+=item fs_backend
+
+git's local clone is nearly the same as a fs backend, this returns
+a Shipwright::Backend::FS object which reflects the cloned_dir repository.
+
+=cut
+
sub fs_backend {
my $self = shift;
return $self->{fs_backend} if $self->{fs_backend};
@@ -122,6 +137,10 @@ sub _yml {
return $return;
}
+=item info
+
+=cut
+
sub info {
my $self = shift;
return $self->fs_backend->info(@_);
@@ -139,11 +158,19 @@ sub _update_file {
$self->commit;
}
+=item import
+
+=cut
+
sub import {
my $self = shift;
return $self->fs_backend->import(@_);
}
+=item commit
+
+=cut
+
sub commit {
my $self = shift;
my %args =
@@ -164,23 +191,6 @@ sub commit {
return;
}
-#sub DESTROY {
-# my $self = shift;
-# my $cwd = getcwd;
-# if ( $self->cloned_dir ) {
-# chdir $self->cloned_dir or return;
-#
-# Shipwright::Util->run( [ $ENV{'SHIPWRIGHT_GIT'}, 'add', '.' ] );
-#
-# TODO comment need to be something special
-# Shipwright::Util->run(
-# [ $ENV{'SHIPWRIGHT_GIT'}, 'commit', '-m', 'comment' ], 1 );
-# Shipwright::Util->run( [ $ENV{'SHIPWRIGHT_GIT'}, 'push' ] );
-# chdir $cwd;
-#
-# }
-#}
-
=back
=cut
diff --git a/lib/Shipwright/Test.pm b/lib/Shipwright/Test.pm
index 9708b05..5563780 100644
--- a/lib/Shipwright/Test.pm
+++ b/lib/Shipwright/Test.pm
@@ -126,7 +126,7 @@ sub create_fs_repo {
return tempdir( 'shipwright_test_fs_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
}
-=head2 create_fs_repo
+=head2 create_git_repo
create a repo for git
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list