Subversion Repositories DevTools

Rev

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

Rev 2048 Rev 2053
Line 202... Line 202...
202
# Inputs          : $self               - Instance data
202
# Inputs          : $self               - Instance data
203
#                   $RepoPath           - Within the repository
203
#                   $RepoPath           - Within the repository
204
#                   $Path               - Local path
204
#                   $Path               - Local path
205
#                   Options             - Options
205
#                   Options             - Options
206
#                           --NoPrint   - Don't print files exported
206
#                           --NoPrint   - Don't print files exported
-
 
207
#                           --KeepWs    - Don't delete the WorkSpace on error
207
#
208
#
208
# Returns         : Nothing
209
# Returns         : Nothing
209
#
210
#
210
sub SvnSwitch
211
sub SvnSwitch
211
{
212
{
212
    my ($self, $RepoPath, $path, @opts) = @_;
213
    my ($self, $RepoPath, $path, @opts) = @_;
213
    my $printdata = ! grep (/^--NoPrint/, @opts );
214
    my $printdata = ! grep (/^--NoPrint/, @opts );
-
 
215
    my $keepWs = grep (/^--KeepWs/, @opts );
214
    Debug ("SvnSwitch", $RepoPath, $path);
216
    Debug ("SvnSwitch", $RepoPath, $path);
215
 
217
 
216
    #
218
    #
217
    #   Build up the command line
219
    #   Build up the command line
218
    #
220
    #
Line 232... Line 234...
232
        #   Delete the workspace and then report the error
234
        #   Delete the workspace and then report the error
233
        #
235
        #
234
        #   Note: For some reason a simple rmtree doesn't work
236
        #   Note: For some reason a simple rmtree doesn't work
235
        #         Nor does glob show all the directories
237
        #         Nor does glob show all the directories
236
        #
238
        #
-
 
239
        unless ( $keepWs )
-
 
240
        {
237
        Verbose2 ("Remove WorkSpace: $path");
241
            Verbose2 ("Remove WorkSpace: $path");
238
        rmtree( $path, IsVerbose(3) );
242
            rmtree( $path, IsVerbose(3) );
239
        rmtree( $path, IsVerbose(3) );
243
            rmtree( $path, IsVerbose(3) );
240
        Error ("Switch elements", @{$self->{ERROR_LIST}}, @sw_list );
244
            Error ("Switch elements", @{$self->{ERROR_LIST}}, @sw_list );
-
 
245
        }
-
 
246
        Warning("Switch error: Workspace state unkwown", @{$self->{ERROR_LIST}}, @sw_list);
241
    }
247
    }
242
    return;
248
    return;
243
 
249
 
244
    #
250
    #
245
    #   Internal routine to scan each line of the Switch output
251
    #   Internal routine to scan each line of the Switch output