[Bps-public-commit] r15885 - in Pushmi/trunk: Pushmi-Admin/lib/Pushmi/Admin/Model

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Sep 9 21:04:33 EDT 2008


Author: alexmv
Date: Tue Sep  9 21:04:15 2008
New Revision: 15885

Modified:
   Pushmi/trunk/   (props changed)
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm

Log:
 r37111 at kohr-ah:  chmrr | 2008-09-09 20:40:16 -0400
  * Move to using after_delete hook, instead of overriding delete
  * Prevent warnings after deletion of replica


Modified: Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm	(original)
+++ Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm	Tue Sep  9 21:04:15 2008
@@ -128,13 +128,13 @@
     return $self->{pushmi} = $p;
 }
 
-sub delete {
+sub after_delete {
     my $self = shift;
     $self->stop_watcher;
     $self->clear_cache;
     rmtree( $self->file_root );
     Pushmi::Admin->update_apache;
-    return $self->SUPER::delete;
+    return 1;
 }
 
 sub remirror {
@@ -219,7 +219,7 @@
 sub cache {
     my $self = shift;
     return $self->{cache} if $self->{cache};
-    return {} unless $self->id;
+    return {} unless $self->id and -e $self->file_root;
 
     my $c      = {};
     my $local  = Pushmi::Admin->svn_info_for( "file://" . $self->svn_root );



More information about the Bps-public-commit mailing list