Ignore:
Timestamp:
Sep 6, 2007, 8:58:25 PM (12 years ago)
Author:
bruno
Message:

Fix still more CVS problems + add mre ENV var for pbinit to be able to use them.

File:
1 edited

Legend:

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

    r114 r115  
    308308my $destdir = shift;
    309309my $tmp;
     310my $tmp1;
    310311
    311312if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
     
    319320    my $dir=dirname($destdir);
    320321    my $base=basename($destdir);
    321     # Doesn't work if called from outside with a full path name to a file/dir to export
    322     $tmp=basename($source);
     322    if (-d $source) {
     323        $tmp1 = $source;
     324        $tmp1 =~ s|$ENV{'PBROOT'}/||;
     325    } else {
     326        $tmp1 = dirname($source);
     327        $tmp1 =~ s|$ENV{'PBROOT'}/||;
     328        $tmp1 = $tmp1."/".basename($source);
     329    }
    323330    # CVS needs a relative path !
    324     pb_system("cd $dir ; cvs export -D \"$pbdate\" -d $base $tmp","Exporting $source from CVS to $destdir");
     331    pb_system("cd $dir ; cvs export -D \"$pbdate\" -d $base $tmp1","Exporting $source from CVS to $destdir");
    325332} else {
    326333    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
Note: See TracChangeset for help on using the changeset viewer.