[Bps-public-commit] r19018 - Shipwright/trunk/lib/Shipwright/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Apr 1 21:16:31 EDT 2009


Author: sunnavy
Date: Wed Apr  1 21:16:31 2009
New Revision: 19018

Modified:
   Shipwright/trunk/lib/Shipwright/Backend/FS.pm
   Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
   Shipwright/trunk/lib/Shipwright/Backend/SVN.pm

Log:
confess if copy fails

Modified: Shipwright/trunk/lib/Shipwright/Backend/FS.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/FS.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/FS.pm	Wed Apr  1 21:16:31 2009
@@ -37,7 +37,7 @@
 
     $self->delete;    # clean repository in case it exists
 
-    dircopy( $dir, $self->repository );
+    dircopy( $dir, $self->repository ) or confess "can't copy $dir to " .  $self->repository . ": $!";
 }
 
 # a cmd generating factory
@@ -189,7 +189,7 @@
 
     my $file = catfile( $self->repository, $path );
 
-    copy( $latest, $file );
+    copy( $latest, $file ) or confess "can't copy $latest to $file: $!";
 }
 
 sub _update_dir {
@@ -198,7 +198,7 @@
     my $latest = shift;
 
     my $dir = catfile( $self->repository, $path );
-    dircopy( $latest, $dir );
+    dircopy( $latest, $dir ) or confess "can't copy $latest to $dir: $!";
 }
 
 =item import

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVK.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVK.pm	Wed Apr  1 21:16:31 2009
@@ -285,7 +285,7 @@
         target => $file,
     );
 
-    copy( $latest, $file );
+    copy( $latest, $file ) or confess "can't copy $latest to $file: $!";
     $self->commit(
         path    => $file,
         comment => "updated $path",
@@ -307,7 +307,7 @@
         target => $dir,
     );
 
-    dircopy( $latest, $dir );
+    dircopy( $latest, $dir ) or confess "can't copy $latest to $dir: $!";
     $self->commit(
         path    => $dir,
         comment => "updated $path",

Modified: Shipwright/trunk/lib/Shipwright/Backend/SVN.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/SVN.pm	Wed Apr  1 21:16:31 2009
@@ -260,7 +260,7 @@
             target => $dir,
         );
 
-        copy( $latest, $file );
+        copy( $latest, $file ) or confess "can't copy $latest to $file: $!";
         $self->commit(
             path    => $file,
             comment => "updated $path",



More information about the Bps-public-commit mailing list