Changeset 366 in ProjectBuilder for devel


Ignore:
Timestamp:
Apr 8, 2008, 12:28:44 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • We need to handle 2 repo in newvm, with the right URL. Should be fixed now
  • Update the right pbcl file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r363 r366  
    11621162    die "-V Version parameter needed" if ((not defined $newver) || ($newver eq ""));
    11631163
    1164     my ($scheme,$uri)=pb_cms_init($pbinit);
     1164    # Need this call for PBDIR
     1165    my ($scheme2,$uri) = pb_cms_init($pbinit);
     1166
     1167    my ($pbconf) = pb_conf_read("$ENV{'PBETC'}","pbconfurl");
     1168    $uri = $pbconf->{$ENV{'PBPROJ'}};
     1169    my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
    11651170
    11661171    # Checking CMS repositories status
    11671172    my ($pburl) = pb_conf_get("pburl");
    1168     my ($scheme2, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
     1173    ($scheme2, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
    11691174
    11701175    if ($scheme !~ /^svn/) {
     
    11841189
    11851190    my $newurl = "$uri/".dirname($tmp)."/$newver";
    1186     my $oldver= basename("$uri/$tmp");
     1191    # Should probably use projver in the old file
     1192    my $oldver= basename($tmp);
    11871193
    11881194    # Checking pbcl files
    1189     foreach my $f (<$ENV{'PBCONFDIR'}/*/pbcl>) {
     1195    foreach my $f (<$ENV{'PBROOTDIR'}/*/pbcl>) {
    11901196        open(PBCL,$f) || die "Unable to open $f";
    11911197        my $foundnew = 0;
     
    11971203    }
    11981204
     1205    # Duplicate and extract project-builder part
    11991206    pb_log(2,"Copying $uri/$tmp to $newurl\n");
    1200     pb_cms_copy($scheme,$uri,$newurl);
    1201     pb_log(2,"Checkout $newurl to $ENV{'PBDIR'}/../$newver\n");
    1202     pb_cms_checkout($scheme,$newurl,"$ENV{'PBDIR'}/../$newver");
     1207    pb_cms_copy($scheme,"$uri/$tmp",$newurl);
     1208    pb_log(2,"Checkout $newurl to $ENV{'PBROOTDIR'}/../$newver\n");
     1209    pb_cms_checkout($scheme,$newurl,"$ENV{'PBCONFDIR'}/../$newver");
     1210
     1211    # Duplicate and extract project
     1212    my $newurl2 = "$pburl->{$ENV{'PBPROJ'}}/".dirname($tmp)."/$newver";
     1213
     1214    pb_log(2,"Copying $pburl->{$ENV{'PBPROJ'}}/$tmp to $newurl2\n");
     1215    pb_cms_copy($scheme,"$pburl->{$ENV{'PBPROJ'}}/$tmp",$newurl2);
     1216    pb_log(2,"Checkout $newurl2 to $ENV{'PBDIR'}/../$newver\n");
     1217    pb_cms_checkout($scheme,$newurl2,"$ENV{'PBDIR'}/../$newver");
    12031218
    12041219    # Update the .pb file
    1205     # Should probably use projver in the old file
    12061220    open(FILE,"$ENV{'PBROOTDIR'}/../$newver/$ENV{'PBPROJ'}.pb") || die "Unable to open $ENV{'PBROOTDIR'}/../$newver/$ENV{'PBPROJ'}.pb";
    12071221    open(OUT,"> $ENV{'PBROOTDIR'}/../$newver/$ENV{'PBPROJ'}.pb.new") || die "Unable to write to $ENV{'PBROOTDIR'}/../$newver/$ENV{'PBPROJ'}.pb.new";
Note: See TracChangeset for help on using the changeset viewer.