[Bps-public-commit] r17764 - in Shipwright/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Fri Jan 16 04:08:54 EST 2009


Author: sunnavy
Date: Fri Jan 16 04:08:53 2009
New Revision: 17764

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Test.pm

Log:
 r18809 at sunnavys-mb:  sunnavy | 2009-01-16 15:59:23 +0800
 the previous logic of skip_svk and skip_svn are wrong, this commit fix that


Modified: Shipwright/trunk/lib/Shipwright/Test.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Test.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Test.pm	Fri Jan 16 04:08:53 2009
@@ -64,8 +64,7 @@
 =cut
 
 sub skip_svn {
-    return 1 unless $ENV{'SHIPWRIGHT_TEST_BACKEND_SVN'};
-    return unless has_svn();
+    return if $ENV{'SHIPWRIGHT_TEST_BACKEND_SVN'} && has_svn();
     return 1;
 }
 
@@ -78,8 +77,7 @@
 =cut
 
 sub skip_svk {
-    return 1 unless $ENV{'SHIPWRIGHT_TEST_BACKEND_SVK'};
-    return unless has_svk();
+    return if $ENV{'SHIPWRIGHT_TEST_BACKEND_SVK'} && has_svk();
     return 1;
 }
 
@@ -101,7 +99,8 @@
 =cut
 
 sub create_svk_repo {
-    $ENV{SVKROOT} = tempdir( 'shipwright_test_svk_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
+    $ENV{SVKROOT} =
+      tempdir( 'shipwright_test_svk_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
     my $svk_root_local = catdir( $ENV{SVKROOT}, 'local' );
     system("svnadmin create $svk_root_local");
     system("svk depotmap -i");
@@ -116,7 +115,8 @@
 =cut
 
 sub create_svn_repo {
-    my $repo = tempdir( 'shipwright_test_svn_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
+    my $repo =
+      tempdir( 'shipwright_test_svn_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
     system("svnadmin create $repo") && confess "create repo failed: $!";
     return "file://$repo";
 }



More information about the Bps-public-commit mailing list