Subversion Repositories DevTools

Rev

Rev 287 | Rev 321 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 287 Rev 299
Line 323... Line 323...
323
#
323
#
324
#   Create a clearcase view to be used for the view
324
#   Create a clearcase view to be used for the view
325
#
325
#
326
$VIEWPATH = "$view_prefix$opt_viewname";
326
$VIEWPATH = "$view_prefix$opt_viewname";
327
$VIEWDIR = "$VIEWDIR_ROOT/$VIEWPATH";
327
$VIEWDIR = "$VIEWDIR_ROOT/$VIEWPATH";
-
 
328
$VIEWDIR =~ tr~\\/~/~s;
328
Verbose( "Hostname: $MACHINENAME" );
329
Verbose( "Hostname: $MACHINENAME" );
329
Verbose( "Viewpath: $VIEWPATH" );
330
Verbose( "Viewpath: $VIEWPATH" );
330
Verbose( "Viewdir : $VIEWDIR" );
331
Verbose( "Viewdir : $VIEWDIR" );
331
 
332
 
332
#
333
#
Line 353... Line 354...
353
 
354
 
354
#
355
#
355
#   If the view currently exists then it will be deleted if allowed
356
#   If the view currently exists then it will be deleted if allowed
356
#
357
#
357
delete_view()
358
delete_view()
358
    unless ( $opt_reuse || $opt_extract_files );
359
    unless ( $opt_reuse );
359
 
360
 
360
#
361
#
361
#   If the user is simply deleting the view then all has been done
362
#   If the user is simply deleting the view then all has been done
362
#
363
#
363
exit 0
364
exit 0
Line 654... Line 655...
654
{
655
{
655
    my $cofound = 0;
656
    my $cofound = 0;
656
    my $uuid;
657
    my $uuid;
657
 
658
 
658
    #
659
    #
659
    #   If the view physically exists then attempt to phyically remove it
660
    #   Simple delete
660
    #
661
    #
-
 
662
    if ( $opt_extract_files )
-
 
663
    {
661
    if ( -d $VIEWDIR )
664
        if ( -d $VIEWDIR )
-
 
665
        {
-
 
666
            Message("Remove extracted files: $VIEWDIR");
-
 
667
            rmtree( $VIEWDIR );
-
 
668
        }
-
 
669
    }
-
 
670
    else
662
    {
671
    {
663
        #
672
        #
664
        #   Determine if there are any checked out files in the view
673
        #   If the view physically exists then attempt to phyically remove it
665
        #
674
        #
-
 
675
        if ( -d $VIEWDIR )
-
 
676
        {
-
 
677
            #
-
 
678
            #   Determine if there are any checked out files in the view
-
 
679
            #
666
        Message("Remove the view: $VIEWDIR");
680
            Message("Remove the view: $VIEWDIR");
667
        Verbose("Look for checked out files");
681
            Verbose("Look for checked out files");
668
 
682
 
669
 
683
 
670
        SvnRmView ('path'     => $VIEWDIR . $opt_path,
684
            SvnRmView ('path'     => $VIEWDIR . $opt_path,
671
                   'force'    => $opt_delete > 1,
685
                       'force'    => $opt_delete > 1,
672
                   'modified' => [ 'local_dpkg_archive' ] );
686
                       'modified' => [ 'local_dpkg_archive' ] );
-
 
687
        }
-
 
688
        Error ("View was not deleted")
-
 
689
            if ( -d $VIEWDIR . $opt_path );
-
 
690
        rmtree( $VIEWDIR ) if $opt_path;
673
    }
691
    }
674
    Error ("View was not deleted")
-
 
675
        if ( -d $VIEWDIR . $opt_path );
-
 
676
 
692
 
677
    #
-
 
678
    #
693
    Error ("View was not deleted")
679
    rmtree( $VIEWDIR ) if $opt_path;
694
        if ( -d $VIEWDIR );
680
}
695
}
681
 
696
 
682
#-------------------------------------------------------------------------------
697
#-------------------------------------------------------------------------------
683
# Function        : copy_directory
698
# Function        : copy_directory
684
#
699
#