List:Commits« Previous MessageNext Message »
From:msvensson Date:April 24 2006 8:27am
Subject:bk commit into 5.0 tree (msvensson:1.2178)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2178 06/04/24 10:27:13 msvensson@neptunus.(none) +2 -0
  Move copy_dir to mtr_misc and rename it to mtr_copy_dir

  mysql-test/mysql-test-run.pl
    1.89 06/04/24 10:27:09 msvensson@neptunus.(none) +2 -22
    Move copy_dir to mtr_misc and rename it to mtr_copy_dir

  mysql-test/lib/mtr_misc.pl
    1.10 06/04/24 10:27:09 msvensson@neptunus.(none) +17 -8
    Move copy_dir to mtr_misc and rename it to mtr_copy_dir

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint

--- 1.9/mysql-test/lib/mtr_misc.pl	2006-03-09 00:24:12 +01:00
+++ 1.10/mysql-test/lib/mtr_misc.pl	2006-04-24 10:27:09 +02:00
@@ -111,18 +111,27 @@
   }
 }
 
+
 sub mtr_copy_dir($$) {
-  my $srcdir= shift;
-  my $dstdir= shift;
+  my $from_dir= shift;
+  my $to_dir= shift;
 
-  # Create destination directory
-  mkpath($dstdir);
-  find(\&mtr_copy_one_file, $dstdir);
-}
+  mkpath("$to_dir");
+  opendir(DIR, "$from_dir")
+    or mtr_error("Can't find $from_dir$!");
+  for(readdir(DIR)) {
+    next if "$_" eq "." or "$_" eq "..";
+    if ( -d "$from_dir/$_" )
+    {
+      mtr_copy_dir("$from_dir/$_", "$to_dir/$_");
+      next;
+    }
+    copy("$from_dir/$_", "$to_dir/$_");
+  }
+  closedir(DIR);
 
-sub mtr_copy_one_file {
-  print $File::Find::name, "\n";
 }
+
 
 sub mtr_same_opts ($$) {
   my $l1= shift;

--- 1.88/mysql-test/mysql-test-run.pl	2006-04-24 10:21:04 +02:00
+++ 1.89/mysql-test/mysql-test-run.pl	2006-04-24 10:27:09 +02:00
@@ -2125,26 +2125,6 @@
   }
 }
 
-sub copy_dir($$) {
-  my $from_dir= shift;
-  my $to_dir= shift;
-
-  mkpath("$to_dir");
-  opendir(DIR, "$from_dir")
-    or mtr_error("Can't find $from_dir$!");
-  for(readdir(DIR)) {
-    next if "$_" eq "." or "$_" eq "..";
-    if ( -d "$from_dir/$_" )
-    {
-      copy_dir("$from_dir/$_", "$to_dir/$_");
-      next;
-    }
-    copy("$from_dir/$_", "$to_dir/$_");
-  }
-  closedir(DIR);
-
-}
-
 #
 # Save a snapshot of the installed test db(s)
 # I.e take a snapshot of the var/ dir
@@ -2157,7 +2137,7 @@
   foreach my $data_dir (@data_dir_lst)
   {
     my $name= basename($data_dir);
-    copy_dir("$data_dir", "$path_snapshot/$name");
+    mtr_copy_dir("$data_dir", "$path_snapshot/$name");
   }
 }
 
@@ -2199,7 +2179,7 @@
       my $name= basename($data_dir);
       save_files_before_restore($test_name, $data_dir);
       rmtree("$data_dir");
-      copy_dir("$path_snapshot/$name", "$data_dir");
+      mtr_copy_dir("$path_snapshot/$name", "$data_dir");
     }
     if ($opt_with_ndbcluster)
     {
Thread
bk commit into 5.0 tree (msvensson:1.2178)msvensson24 Apr