Changeset 527 in ProjectBuilder for devel/pb/lib/ProjectBuilder/CMS.pm


Ignore:
Timestamp:
Aug 8, 2008, 8:57:39 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Fix CVS export functin to also use tags passed in param.
  • Backport build fixes from 0.9.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r500 r527  
    196196        $tmp1 = $uri;
    197197    }
    198     my $optcvs = "";
    199 
    200198    # If we're working on the CVS itself
    201199    my $cvstag = basename($ENV{'PBROOTDIR'});
     
    313311    return;
    314312} elsif ($scheme =~ /^cvs/) {
    315     pb_system("cvs co $url $destination","Checking out $url to $destination ");
     313    my ($scheme, $account, $host, $port, $path) = pb_get_uri($url);
     314
     315    # If we're working on the CVS itself
     316    my $cvstag = basename($ENV{'PBROOTDIR'});
     317    my $cvsopt = "";
     318    if ($cvstag eq "cvs") {
     319        my @date = pb_get_date();
     320        my $pbdate = strftime("%Y-%m-%d %H:%M:%S", @date);
     321        $cvsopt = "-D \"$pbdate\"";
     322    } else {
     323        # we're working on a tag which should be the last part of PBROOTDIR
     324        $cvsopt = "-r $cvstag";
     325    }
     326    pb_mkdir_p("$destination");
     327    pb_system("cd $destination ; cvs -d $account\@$host:$path co $cvsopt .","Checking out $url to $destination");
    316328} elsif ($scheme =~ /^file/) {
    317329    pb_cms_export($url,undef,$destination);
Note: See TracChangeset for help on using the changeset viewer.