code_churn/fbf_churn.pl
changeset 55 7b39c2ae2526
parent 49 c0d2a34bf681
child 158 27cf0a88d449
equal deleted inserted replaced
54:9f1f932c7b09 55:7b39c2ae2526
    20 use FindBin;
    20 use FindBin;
    21 #my $churn_core = "D:\\mirror\\churn_core.pl";
    21 #my $churn_core = "D:\\mirror\\churn_core.pl";
    22 my $churn_core = "$FindBin::Bin\\churn_core.pl";
    22 my $churn_core = "$FindBin::Bin\\churn_core.pl";
    23 my $churn_output_temp = "$FindBin::Bin\\fbf_churn_output";
    23 my $churn_output_temp = "$FindBin::Bin\\fbf_churn_output";
    24 mkdir $churn_output_temp;
    24 mkdir $churn_output_temp;
       
    25 
       
    26 my $path = $FindBin::Bin;
       
    27 $path =~ s/\//\\/g;
       
    28 my $clone_packages = "$path\\..\\clone_packages\\clone_all_packages.pl";
       
    29 
    25 
    30 
    26 sub Usage($)
    31 sub Usage($)
    27   {
    32   {
    28   my ($msg) = @_;
    33   my ($msg) = @_;
    29   
    34   
   140 my $new_rev = $new;
   145 my $new_rev = $new;
   141 $new_rev = "%REV%" if ($new_rev eq "");
   146 $new_rev = "%REV%" if ($new_rev eq "");
   142 
   147 
   143 #TO_DO: Locate clone_all_packages relative to the location of this script.
   148 #TO_DO: Locate clone_all_packages relative to the location of this script.
   144 #TO_DO: Remove references to absolute paths, change to relative paths.
   149 #TO_DO: Remove references to absolute paths, change to relative paths.
   145 do_system("clone_all_packages.pl",@verboseopt,"-mirror","-filter","$licence.*$codeline.*$filter",@packagelistopts,"-exec","--",
   150 do_system($clone_packages,@verboseopt,"-mirror","-filter","$licence.*$codeline.*$filter",@packagelistopts,"-exec","--",
   146    "hg","--config","\"extensions.hgext.extdiff=\"","extdiff","-p",$churn_core,"-o",$churn_output_temp,
   151    "hg","--config","\"extensions.hgext.extdiff=\"","extdiff","-p",$churn_core,"-o",$churn_output_temp,
   147    "-r","$old","-r","$new_rev");
   152    "-r","$old","-r","$new_rev");
   148 
   153 
   149 exit(0);
   154 exit(0);