Subversion Repositories DevTools

Rev

Rev 3965 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3965 Rev 4001
Line 465... Line 465...
465
    my (@fileList) = @_;
465
    my (@fileList) = @_;
466
    Verbose2 ("ToolsetFile:", @fileList);
466
    Verbose2 ("ToolsetFile:", @fileList);
467
    Error ("Internal: ToolsetFile. ScmRoot or ScmInterface not defined")
467
    Error ("Internal: ToolsetFile. ScmRoot or ScmInterface not defined")
468
        unless ( defined $::ScmRoot && defined $::ScmInterface );
468
        unless ( defined $::ScmRoot && defined $::ScmInterface );
469
 
469
 
470
    my $dataFile = "$::ScmRoot/$::ScmInterface/GbeFiles.cfg";
470
    my $dataDir = "$::ScmRoot/$::ScmInterface";
-
 
471
    my $dataFile = "$dataDir/GbeFiles.cfg";
471
 
472
 
472
    Error ("Internal: ToolsetFile. Cwd not defined")
473
    Error ("Internal: ToolsetFile. Cwd not defined")
473
        unless ( defined $::Cwd );
474
        unless ( defined $::Cwd );
474
 
475
 
475
 
476
 
Line 488... Line 489...
488
        $GBE_TOOLSETFiles{Root} = AbsPath($::ScmRoot)
489
        $GBE_TOOLSETFiles{Root} = AbsPath($::ScmRoot)
489
            unless defined $GBE_TOOLSETFiles{Root};
490
            unless defined $GBE_TOOLSETFiles{Root};
490
    }
491
    }
491
 
492
 
492
    #
493
    #
493
    #   Add files
494
    # Save to disk if
-
 
495
    #   Target directory exists - creation may be delayed
494
    #       Need to be full paths
496
    #   We have added entries
495
    #
497
    #
-
 
498
    if ( @fileList )
-
 
499
    {
-
 
500
        #
-
 
501
        #   Add files
-
 
502
        #       Need to be full paths
-
 
503
        #
496
    $GBE_TOOLSETFiles{Files}{RelPath(AbsPath($_), $GBE_TOOLSETFiles{Root} )} = 1 foreach ( @fileList );
504
        $GBE_TOOLSETFiles{Files}{RelPath(AbsPath($_), $GBE_TOOLSETFiles{Root} )} = 1 foreach ( @fileList );
497
 
505
 
498
    #
506
        #
499
    #   Save file
507
        #   Save file
500
    #   Simply rewrite the file
508
        #   Simply rewrite the file - if the terget directory exists
-
 
509
        #   Its creation may be after we have started accumulating files
501
    #
510
        #
502
    my $fh = ConfigurationFile::New( $dataFile );
511
        if ( -d $dataDir  ) {
503
    $fh->Header( "ToolsetFile",
512
            my $fh = ConfigurationFile::New( $dataFile );
504
                              "Toolset Files" );
513
            $fh->Header( "ToolsetFile", "Toolset Files" );
505
    $fh->Dump( [\%GBE_TOOLSETFiles], [qw(*GBE_TOOLSETFiles)] );
514
            $fh->Dump( [\%GBE_TOOLSETFiles], [qw(*GBE_TOOLSETFiles)] );
506
    $fh->Close();
515
            $fh->Close();
-
 
516
        }
507
    
517
    }
508
}
518
}
509
 
519
 
510
1;  #success
520
1;  #success
511
 
521