I have a perl script that I use to copy the modified elements to a certain folder.
I use the following cleartool command:
cleartool find . -version "{brtype(Branch) && created_since(28-Feb-2014) && (version(...\\Branch\\LATEST))}
And then I parse the result using perl script to copy the files modified as per the date criteria above over to the specified folder:
foreach $file (@files)
{
$file =~ s/@@.*$//g;
if ($file =~ /\.csp$/i) {
if ( -e $file) { die "$file exists" };
chomp($file);
$dname=dirname($file);
$dname=~ s/\///g;
$dname1=substr($dname,1);
$dirname="C:\\AutoDeliver" . "$dname1";
unless(-d $dirname){
mkpath $dirname or die "cannot create dir";
}
copy ("$file",$dirname) or die "File cannot be copied. It may already exist.";
print STDOUT $file;
}
}
This works fine in every stream except one. That one stream is only used for delivering code to and from and is the child directly under the integration stream. With my script, I get all the modified elements correclty but the elements have the wrong version. All the element versions copied are same as the integration stream. This seems to me that since the child stream does not have any elements version created and the version tree eyeball is always looking at the integration stream causing the integration version to be copied. How do I avoid this so that I get the version from the child stream. Please help. Thanks.