Subversion Repositories DevTools

Rev

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

Rev 7300 Rev 7304
Line 1197... Line 1197...
1197
    #       Should only be one - but if the users have been bad
1197
    #       Should only be one - but if the users have been bad
1198
    #       then there may be more.
1198
    #       then there may be more.
1199
    #
1199
    #
1200
    if ( $data->{files} )
1200
    if ( $data->{files} )
1201
    {
1201
    {
1202
        foreach my $srcFile ( reverse @{$data->{files}} )
1202
        foreach my $item ( reverse @{$data->{files}} )
1203
        {
1203
        {
-
 
1204
            my ($srcFile, $action) = split( $;, $item);
1204
            Verbose("importTagChanges: $srcFile");
1205
            Verbose("importTagChanges ($action): $srcFile");
1205
            my $sfile = $svnSession->FullPath() . '/' . $srcFile;
1206
            my $sfile = $svnSession->FullPath() . '/' . $srcFile;
1206
 
1207
 
1207
            #
1208
            #
1208
            #   Calculate path within the repo of the target file
1209
            #   Calculate path within the repo of the target file
1209
            #
1210
            #
Line 1215... Line 1216...
1215
                #       aaa/bbbb/tags/badTag was a copy of aaa
1216
                #       aaa/bbbb/tags/badTag was a copy of aaa
1216
                #
1217
                #
1217
                Error ("importTagChanges. Unexpected format of filename: $srcFile",
1218
                Error ("importTagChanges. Unexpected format of filename: $srcFile",
1218
                       "Possible cause: Incorrect tag placement");
1219
                       "Possible cause: Incorrect tag placement");
1219
            }
1220
            }
-
 
1221
            my $rfile = $1;
1220
            my $tfile = $workSpace . $1;
1222
            my $tfile = $workSpace . $1;
1221
 
1223
            
1222
            if ( $opt_mkbranch )
1224
            if ($action eq 'D')
1223
            {
1225
            {
-
 
1226
                # File was deleted
-
 
1227
                my $mode = '-';
-
 
1228
                if (-f $tfile) {
1224
                $svnSession->SvnSwitch ($sfile, $tfile);
1229
                    unlink ( $tfile );
-
 
1230
                    $mode = ' ';
-
 
1231
                }
-
 
1232
                Information("Deleting  : D$mode   $VIEWPATH$rfile");
1225
            }
1233
            }
1226
            else
1234
            else
1227
            {
1235
            {
-
 
1236
                if ( $opt_mkbranch )
-
 
1237
                {
-
 
1238
                    $svnSession->SvnSwitch ($sfile, $tfile);
-
 
1239
                }
-
 
1240
                else
-
 
1241
                {
1228
                $svnSession->SvnCo ($sfile, $tfile,
1242
                    $svnSession->SvnCo ($sfile, $tfile,
1229
                                        'export' => 1,
1243
                                            'export' => 1,
1230
                                        'force' => 1,
1244
                                            'force' => 1,
1231
                                        'escrow' => $opt_escrow,
1245
                                            'escrow' => $opt_escrow,
1232
                                        'pretext' => 'Replacing ' );
1246
                                            'pretext' => 'Replacing ' );
-
 
1247
                }
1233
            }
1248
            }
1234
        }
1249
        }
1235
    }
1250
    }
1236
}
1251
}
1237
 
1252