Subversion Repositories DevTools

Rev

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

Rev 239 Rev 241
Line 1125... Line 1125...
1125
#
1125
#
1126
# Returns         : 
1126
# Returns         : 
1127
#
1127
#
1128
sub extract_files_from_view
1128
sub extract_files_from_view
1129
{
1129
{
-
 
1130
    my $vob_mounted = 1;
-
 
1131
    my $vob_name;
-
 
1132
 
1130
    #
1133
    #
1131
    #   Determine the target directory for the extracted files
1134
    #   Determine the target directory for the extracted files
1132
    #       Delete the output subdir
1135
    #       Delete the output subdir
1133
    #       Create the config spec in that directory
1136
    #       Create the config spec in that directory
1134
    #
1137
    #
Line 1157... Line 1160...
1157
    ClearCmd ( "rmview -tag $VIEWTAG" );
1160
    ClearCmd ( "rmview -tag $VIEWTAG" );
1158
    ClearCmd ( "mkview -tag $VIEWTAG -stgloc -auto" );
1161
    ClearCmd ( "mkview -tag $VIEWTAG -stgloc -auto" );
1159
    ClearCmd ( "setcs  -tag $VIEWTAG $config" );
1162
    ClearCmd ( "setcs  -tag $VIEWTAG $config" );
1160
 
1163
 
1161
    #
1164
    #
-
 
1165
    #   Ensure that the base VOB has been 'mounted'
-
 
1166
    #   Dynamic views require vobs to be mounted
-
 
1167
    #
-
 
1168
    ($vob_name = $ROOT_VOB) =~ s~/~$VOB_SEP~g;
-
 
1169
    $vob_mounted = ClearCmd ("mount $vob_name");
-
 
1170
 
-
 
1171
    #
1162
    #   Calculate where the dynmaic view will be
1172
    #   Calculate where the dynmaic view will be
1163
    #   This differ between UNIX/WINDOWS
1173
    #   This differ between UNIX/WINDOWS
1164
    #
1174
    #
1165
    my $vpath = $VIEW_PREFIX . $VIEWTAG . $VOB_PREFIX;
1175
    my $vpath = $VIEW_PREFIX . $VIEWTAG . $VOB_PREFIX;
1166
    my $cpath = $vpath;
1176
    my $cpath = $vpath;
Line 1175... Line 1185...
1175
    #   Copy all the files out of the view
1185
    #   Copy all the files out of the view
1176
    #
1186
    #
1177
    Verbose ("Copy View contents");
1187
    Verbose ("Copy View contents");
1178
    my $rv = copy_directory ($cpath, $VIEWDIR, $vpath );
1188
    my $rv = copy_directory ($cpath, $VIEWDIR, $vpath );
1179
    Message ("View files in: $VIEWDIR, Files: $copy_count" );
1189
    Message ("View files in: $VIEWDIR, Files: $copy_count" );
-
 
1190
 
1180
    #
1191
    #
1181
    #   Remove the view
1192
    #   Remove the view
1182
    #
1193
    #
1183
    ClearCmd ( "rmview -tag $VIEWTAG" );
1194
    ClearCmd ( "rmview -tag $VIEWTAG" );
1184
 
1195
 
-
 
1196
    #
-
 
1197
    #   Unmount the vob - if mounted
-
 
1198
    #
-
 
1199
    ClearCmd ("umount $vob_name") unless $vob_mounted;
-
 
1200
 
1185
    Error ("Copy did not complete without error")
1201
    Error ("Copy did not complete without error")
1186
        if ( $rv );
1202
        if ( $rv );
1187
 
1203
 
1188
}
1204
}
1189
 
1205