Moving VTK CVS 
    Bill Hoffman 
    bill.hoffman at kitware.com
       
    Mon May 22 15:11:02 EDT 2000
    
    
  
I have a perl script that works on windows and unix assuming
that perl is installed on both.  The script is attached.
To run the script you do this:
perl move_cvs.pl /path/to/vtk
-Bill
At 10:07 AM 5/22/00 -0400, Ken Martin wrote:
>We are moving the VTK CVS repository from vtk.scorec.rpi.edu to www.visualizationtoolkit.org today. So please do not check in any changes until I send out another email. To help with your existing checkouts Bill Lorensen will send out a UNIX script to move your CVS repository to the new location. At one point we had a PC version as well but I'm not sure where it is.
>
>- Thanks
>- Ken
-------------- next part --------------
use File::Find;
use File::Copy;
$current_root = "\@vtk\.scorec\.rpi\.edu:/vtk/cvsroot";
$new_root = "\@www\.visualizationtoolkit\.org:/vtk/cvsroot";
sub usage {
    # Print out the usage message
    print STDERR qq'
@_
usage: $prog directory
  where directory is a VTK source tree checkout
';
    exit 1;
}
&usage("No directory given") unless ($directory = shift);
$directory =~ s/\/+$//;
find(\&file_process,$directory );
sub file_process
{ 
    local ($full_path) = $File::Find::name;
    if ( /Root$/  )
    {
# make sure it is a Root or Repository in a CVS	directory
	if( $full_path =~ /CVS/)
	{
	    &make_change($File::Find::name);
	}
    }
}
sub make_change
{
    local ($path) = $_;
    chmod 0644, $path;
    print "change $File::Find::name \n";
    copy($path, $path . '.bak');
    open(ROOTFILE, ">$path");
    open(ORIGFILE, $path . '.bak');
    while(<ORIGFILE>)
    {
	print $_;
	print $current_root . " " . $new_root . "\n";
	s|:pserver:(.*)$current_root|:pserver:$1$new_root|g;
	print ROOTFILE;
    }
    close(ROOTFILE);
    close(ORIGFILE);
    unlink($path . '.bak');
}
    
    
More information about the vtk-developers
mailing list