Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearcase perl script

Status
Not open for further replies.

geok

IS-IT--Management
Feb 24, 2006
2
GB
hi,

Trying to execute a perl script to migrate views in clearcase. Having some issues when executing script get the following error:

Can't cd to (D:/ClearCaseStorage/Views/STOCKBROKERS/user1/) user1.vws :
No such file or directory
Can't cd to (D:/ClearCaseStorage/Views/STOCKBROKERS/) user2 : No such file
or directory
Can't cd to (D:/ClearCaseStorage/Views/STOCKBROKERS/) user3 : No such file or
directory
Leaving D:/ClearCaseStorage/Views/STOCKBROKERS


This the piece of code which is affected.

sub Wanted{
if (m/^(.*?).vws/i){
print "############################################\n";
print "Working on view $1\n";
print "With view $_ \n";
$path = cwd;
$ccpath = $path."/".$_;
if ($ccpath){
print "$ccpath \n";
# Run fix_prot
print "Run fix_prot\n" ;
$var = "C:\\Program Files\\Rational\\ClearCase\\etc\\utils\\";
chdir($var) or die ("Cannot change to dir '$var': $!");
$cmd = "fix_prot -r -root -chown th_clearcase -chgrp guests \"$ccpath\"" ; &execute_cmd ;


The problem seems to be with the path to the vob its using / instead or \, so when it need to cd to the view directory, its getting confused, how can i change this to cd to the correct directory.
 
I seem to remember that ClearCase VOBs are virtual - try opening one with notepad and see what happens - I suspect perl will get the same problem...
 
Sorry steve im a bit confused on what your saying, its views im taking about, i think this piece of the perl is causing the problem $ccpath = $path."/".$_;
 
What I mean is that I don't think the VOBs are real files, that's why I suggested opening one with notepad. If you can't do it, then probably perl won't be able to, either...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top