[Bps-public-commit] Shipwright branch, master, updated. 06c93585f8c1a095afe7832fde5a865d33bd5393

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Apr 26 08:12:00 EDT 2009


The branch, master has been updated
       via  06c93585f8c1a095afe7832fde5a865d33bd5393 (commit)
      from  b7607a949d98dea12b52884e70165b3d3acb3550 (commit)

Summary of changes:
 lib/Shipwright/Backend/Git.pm |   36 ++++++++++++++++++++++++++++++++----
 1 files changed, 32 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 06c93585f8c1a095afe7832fde5a865d33bd5393
Author: sunnavy <sunnavy at gmail.com>
Date:   Sun Apr 26 20:11:36 2009 +0800

    go on improving git backend

diff --git a/lib/Shipwright/Backend/Git.pm b/lib/Shipwright/Backend/Git.pm
index 54911a6..17373e1 100644
--- a/lib/Shipwright/Backend/Git.pm
+++ b/lib/Shipwright/Backend/Git.pm
@@ -132,7 +132,7 @@ sub _yml {
     my $self = shift;
     my $return = $self->fs_backend->_yml(@_);
     if ( @_ > 1 ) {
-        $self->commit;
+        $self->commit( comment => 'update ' . $_[0] );
     }
     return $return;
 }
@@ -149,13 +149,13 @@ sub info {
 sub _update_dir {
     my $self = shift;
     $self->fs_backend->_update_dir(@_);
-    $self->commit;
+    $self->commit( comment => 'update ' . $_[0] );
 }
 
 sub _update_file {
     my $self = shift;
     $self->fs_backend->_update_file(@_);
-    $self->commit;
+    $self->commit( comment => 'update ' . $_[0] );
 }
 
 =item import
@@ -164,7 +164,11 @@ sub _update_file {
 
 sub import {
     my $self = shift;
-    return $self->fs_backend->import(@_);
+    $self->fs_backend->import(@_);
+    my %args = @_;
+    my $name = $args{source};
+    $name =~ s!.*/!!;
+    $self->commit( comment => 'import ' . $name );
 }
 
 =item commit
@@ -191,6 +195,30 @@ sub commit {
     return;
 }
 
+=item delete
+
+=cut 
+
+sub delete {
+    my $self = shift;
+    $self->fs_backend->delete(@_);
+    my %args = @_;
+    $self->commit( comment => 'delete ' . $args{path} );
+}
+
+=item move
+
+=cut 
+
+sub move {
+    my $self = shift;
+    $self->fs_backend->move(@_);
+    my %args     = @_;
+    my $path     = $args{path};
+    my $new_path = $args{new_path};
+    $self->commit( comment => "move $path to $new_path" );
+}
+
 =back
 
 =cut

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list