[Bps-public-commit] Test-Chimps-Client branch, master, updated. d4ca796933a54fba87c078fc0c31c751897996ac

Ruslan Zakirov ruz at bestpractical.com
Sat May 23 07:01:47 EDT 2009


The branch, master has been updated
       via  d4ca796933a54fba87c078fc0c31c751897996ac (commit)
      from  4b57772b4b4e84bc17a63a39dc3887dc9cb9ad2c (commit)

Summary of changes:
 lib/Test/Chimps/Smoker/Git.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit d4ca796933a54fba87c078fc0c31c751897996ac
Author: Ruslan Zakirov <Ruslan.Zakirov at gmail.com>
Date:   Sat May 23 15:01:19 2009 +0400

    * git 1.5 can not clone into dir that already exists, so we delete dir and clone then

diff --git a/lib/Test/Chimps/Smoker/Git.pm b/lib/Test/Chimps/Smoker/Git.pm
index 4cd2a57..8a73573 100644
--- a/lib/Test/Chimps/Smoker/Git.pm
+++ b/lib/Test/Chimps/Smoker/Git.pm
@@ -28,7 +28,12 @@ sub committer {
 sub clone {
     my $self = shift;
 
-    system( qw(git clone), $self->uri, $self->directory ) == 0
+# XXX: git 1.5 can not clone into dir that already exists, so we delete dir
+# and clone then
+    my $dir = $self->directory;
+    rmdir $dir
+        or die "Couldn't remove '$dir' that should be empty tmp dir created for clone: $!";
+    system( qw(git clone), $self->uri, $dir ) == 0
         or die "couldn't clone ". $self->uri .": $!";
 
     return 1;

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



More information about the Bps-public-commit mailing list