Pregunta

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.

¿Fue útil?

Solución

A Child stream would reference the same version of the parent stream when it has foundation baselines created on the parent stream, and simply rebased on the child stream.

In that case, there is no point of running your script on that specific branch, as it would always reflect versions created on its parent.


The OP comments:

I see the issue now after stepping into my script. My script is run against the dynamic view.

The dynamic view is holding on to the element versions from the integration while the snapshot view on the same stream is properly updated and showing the latest version of the same elements.
I thought the dynamic view is updated on the fly and will always have the latest content.

In fact:

The dynamic view was incorrectly setup.
I just created a brand new view and it's working as expected

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top