Changeset 590 in ProjectBuilder


Ignore:
Timestamp:
Oct 14, 2008, 11:28:50 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Impove CmS messages when dealing with /.. paths
  • Improve newver and pbcl management in order to only touch created files, not original ones.
Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r586 r590  
    16151615    # Checking pbcl files
    16161616    foreach my $f (<$ENV{'PBROOTDIR'}/*/pbcl>) {
     1617        # Compute new pbcl file
     1618        my $f2 = $f;
     1619        $f2 =~ s|$ENV{'PBROOTDIR'}|$ENV{'PBROOTDIR'}/../$newver/|;
    16171620        open(PBCL,$f) || die "Unable to open $f";
    16181621        my $foundnew = 0;
     
    16211624        }
    16221625        close(PBCL);
    1623         open(OUT,"> $f.new") || die "Unable to write to $f.new: $!";
     1626        open(OUT,"> $f2") || die "Unable to write to $f2: $!";
    16241627        open(PBCL,$f) || die "Unable to open $f";
    16251628        while (<PBCL>) {
     
    16291632                print OUT "- TBD\n";
    16301633                print OUT "\n";
    1631                 pb_log(0,"WARNING: version $newver not found in $f so added...") if ($foundnew == 0);
     1634                pb_log(0,"WARNING: version $newver not found in $f so added to $f2...\n") if ($foundnew == 0);
    16321635            }
    16331636        }
    16341637        close(OUT);
    16351638        close(PBCL);
    1636         rename("$f.new","$f");
    16371639    }
    16381640
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r544 r590  
    135135            $tmp = "$destdir/".basename($source);
    136136        }
    137         pb_system("svn export $source $tmp","Exporting $source from SVN to $tmp");
    138     } else {
    139         pb_system("svn export $uri $destdir","Exporting $uri from SVN to $destdir");
     137        pb_system("svn export $source $tmp","Exporting $source from SVN to $tmp ");
     138    } else {
     139        pb_system("svn export $uri $destdir","Exporting $uri from SVN to $destdir ");
    140140    }
    141141} elsif ($scheme eq "dir") {
    142     pb_system("cp -a $path $destdir","Copying $uri from DIR to $destdir");
     142    pb_system("cp -a $path $destdir","Copying $uri from DIR to $destdir ");
    143143} elsif (($scheme eq "http") || ($scheme eq "ftp")) {
    144144    my $f = basename($path);
     
    175175    if ($mm =~ /\/x-bzip-compressed-tar$/) {
    176176        # tar+bzip2
    177         pb_system("cd $destdir ; tar xfj $path","Extracting $path in $destdir");
     177        pb_system("cd $destdir ; tar xfj $path","Extracting $path in $destdir ");
    178178    } elsif ($mm =~ /\/x-lzma-compressed-tar$/) {
    179179        # tar+lzma
    180         pb_system("cd $destdir ; tar xfY $path","Extracting $path in $destdir");
     180        pb_system("cd $destdir ; tar xfY $path","Extracting $path in $destdir ");
    181181    } elsif ($mm =~ /\/x-compressed-tar$/) {
    182182        # tar+gzip
    183         pb_system("cd $destdir ; tar xfz $path","Extracting $path in $destdir");
     183        pb_system("cd $destdir ; tar xfz $path","Extracting $path in $destdir ");
    184184    } elsif ($mm =~ /\/x-tar$/) {
    185185        # tar
    186         pb_system("cd $destdir ; tar xf $path","Extracting $path in $destdir");
     186        pb_system("cd $destdir ; tar xf $path","Extracting $path in $destdir ");
    187187    } elsif ($mm =~ /\/zip$/) {
    188188        # zip
    189         pb_system("cd $destdir ; unzip $path","Extracting $path in $destdir");
     189        pb_system("cd $destdir ; unzip $path","Extracting $path in $destdir ");
    190190    } else {
    191191        # simple file: copy it (patch e.g.)
     
    213213        $cvsopt = "-r $cvstag";
    214214    }
    215     pb_system("cd $dir ; cvs -d $account\@$host:$path export $cvsopt -d $base $tmp1","Exporting $tmp1 from $source under CVS to $destdir");
     215    pb_system("cd $dir ; cvs -d $account\@$host:$path export $cvsopt -d $base $tmp1","Exporting $tmp1 from $source under CVS to $destdir ");
    216216} else {
    217217    die "cms $scheme unknown";
     
    333333    }
    334334    pb_mkdir_p("$destination");
    335     pb_system("cd $destination ; cvs -d $account\@$host:$path co $cvsopt .","Checking out $url to $destination");
     335    pb_system("cd $destination ; cvs -d $account\@$host:$path co $cvsopt .","Checking out $url to $destination ");
    336336} elsif ($scheme =~ /^file/) {
    337337    pb_cms_export($url,undef,$destination);
     
    354354
    355355if ($scheme =~ /^svn/) {
    356     pb_system("svn up $dir","Updating $dir");
     356    pb_system("svn up $dir","Updating $dir ");
    357357} elsif ($scheme eq "flat") {
    358358} elsif ($scheme =~ /^cvs/) {
    359     pb_system("cvs up $dir","Updating $dir");
     359    pb_system("cvs up $dir","Updating $dir ");
    360360} else {
    361361    die "cms $scheme unknown";
     
    382382
    383383if ($scheme =~ /^svn/) {
    384     pb_system("svn ci -m \"$msg\" $dir","Checking in $dir");
     384    pb_system("svn ci -m \"$msg\" $dir","Checking in $dir ");
    385385} elsif ($scheme eq "flat") {
    386386} elsif ($scheme =~ /^cvs/) {
    387     pb_system("cvs ci -m \"$msg\" $dir","Checking in $dir");
     387    pb_system("cvs ci -m \"$msg\" $dir","Checking in $dir ");
    388388} else {
    389389    die "cms $scheme unknown";
     
    405405
    406406if ($scheme =~ /^svn/) {
    407     pb_system("svn add $f","Adding $f to SVN");
     407    pb_system("svn add $f","Adding $f to SVN ");
    408408} elsif ($scheme eq "flat") {
    409409} elsif ($scheme =~ /^cvs/) {
    410     pb_system("cvs add $f","Adding $f to CVS");
     410    pb_system("cvs add $f","Adding $f to CVS ");
    411411} else {
    412412    die "cms $scheme unknown";
Note: See TracChangeset for help on using the changeset viewer.