Subversion Repositories DevTools

Rev

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

Rev 1349 Rev 1356
Line 95... Line 95...
95
my $label_count = 0;                        # Number of labels to create the view
95
my $label_count = 0;                        # Number of labels to create the view
96
my @label_not_pegged;                       # List of unpegged labels
96
my @label_not_pegged;                       # List of unpegged labels
97
my @messageText;                            # Messages to be displayed AFTER extraction
97
my @messageText;                            # Messages to be displayed AFTER extraction
98
my $workSpace;                              # Path to created workspace (or extact)
98
my $workSpace;                              # Path to created workspace (or extact)
99
my $svnSession;                             # Primary Subversion Session
99
my $svnSession;                             # Primary Subversion Session
100
my $noReleaseWs = 1;                        # Do not officially release from this
100
my $noReleaseWs = 0;                        # Do not officially release from this
101
my $checkDelta = 1;                         # Check Diffs between Tag and Head
101
my $checkDelta = 1;                         # Check Diffs between Tag and Head
102
                                            #   0 - Don't do anything
102
                                            #   0 - Don't do anything
103
                                            #   1 - Warn about diffs
103
                                            #   1 - Warn about diffs
104
                                            #   2 - Error if diffs
104
                                            #   2 - Error if diffs
105
 
105
 
Line 110... Line 110...
110
my $devBranch;                              # Development Branch - within the package
110
my $devBranch;                              # Development Branch - within the package
111
my $devBranchPeg;                           # May be pegged
111
my $devBranchPeg;                           # May be pegged
112
my $devBranchHead;                          # Revision of the HEAD of the development branch
112
my $devBranchHead;                          # Revision of the HEAD of the development branch
113
my $tagLabel;                               # Label in 'tags'
113
my $tagLabel;                               # Label in 'tags'
114
my $tagPeg;                                 # May be pegged
114
my $tagPeg;                                 # May be pegged
115
my $tagLabelDistance;                       # Number of changes made to tag after taken
-
 
116
my $tagLabelBranch;                         # Tagged from this branch: Discovered
115
my $tagLabelBranch;                         # Tagged from this branch: Discovered
117
my $tagLabelBranchPeg;                      # Tagged from this branch at this peg: Discovered
116
my $tagLabelBranchPeg;                      # Tagged from this branch at this peg: Discovered
118
my $ttbType;                                # trunk, tags or branches
117
my $ttbType;                                # trunk, tags or branches
119
my $urlType;                                # 'jats' or 'url'
118
my $urlType;                                # 'jats' or 'url'
120
my $initialUrl;                             # Initial URL of target
119
my $initialUrl;                             # Initial URL of target
Line 223... Line 222...
223
if ( $opt_devModeStr )
222
if ( $opt_devModeStr )
224
{
223
{
225
    if ( $opt_devModeStr =~ m/^(Tip)|(BranchTip)$/i) {
224
    if ( $opt_devModeStr =~ m/^(Tip)|(BranchTip)$/i) {
226
        $opt_devMode = 'tip';
225
        $opt_devMode = 'tip';
227
        $checkDelta = 1;
226
        $checkDelta = 1;
-
 
227
        $noReleaseWs = 1;
228
    } elsif ( $opt_devModeStr =~ m/^(Tag)|(TagPoint)$/i) {
228
    } elsif ( $opt_devModeStr =~ m/^(Tag)|(TagPoint)$/i) {
229
        $opt_devMode = 'tag';
229
        $opt_devMode = 'tag';
230
        $checkDelta = 2;
230
        $checkDelta = 2;
231
        $checkDelta = 1 if ( $opt_branch );
231
        $checkDelta = 1 if ( $opt_branch );
232
        $noReleaseWs = 0;
232
        $noReleaseWs = 0;
233
    } elsif ( $opt_devModeStr =~ m/^(Work)|(Working)$/i) {
233
    } elsif ( $opt_devModeStr =~ m/^(Work)|(Working)$/i) {
234
        $opt_devMode = '';
234
        $opt_devMode = '';
235
        $checkDelta = 1;
235
        $checkDelta = 1;
-
 
236
        $noReleaseWs = 0;
236
    } elsif ( $opt_devModeStr =~ m/^Exact$/i) {
237
    } elsif ( $opt_devModeStr =~ m/^Exact$/i) {
237
        $opt_devMode = 'exact';
238
        $opt_devMode = 'exact';
238
        $checkDelta = 1;
239
        $checkDelta = 1;
239
        $noReleaseWs = 0;
240
        $noReleaseWs = 0;
240
        Error ('Not allowed to mix -branch and -devMode=exact') if ( $opt_branch );
241
        Error ('Not allowed to mix -branch and -devMode=exact') if ( $opt_branch );
Line 1130... Line 1131...
1130
        $view_tag = $initialUrl;
1131
        $view_tag = $initialUrl;
1131
    }
1132
    }
1132
 
1133
 
1133
    $svnSession->SvnCo ( $svnSession->FullPath() . '/' . $view_tag,
1134
    $svnSession->SvnCo ( $svnSession->FullPath() . '/' . $view_tag,
1134
                        $VIEWDIR,
1135
                        $VIEWDIR,
1135
                        '--Export',
1136
                        'export' => 1,
1136
                        '--NoPrint' );
1137
                        'print' => 0 );
1137
 
1138
 
1138
    #
1139
    #
1139
    #   Count this files in the view
1140
    #   Count this files in the view
1140
    #   Done so that its clear when we have a empty workspace in escrow extractions
1141
    #   Done so that its clear when we have a empty workspace in escrow extractions
1141
    #
1142
    #
Line 1187... Line 1188...
1187
    #   Process the data from the backtrack log and determine the files
1188
    #   Process the data from the backtrack log and determine the files
1188
    #   that we need to transfer.
1189
    #   that we need to transfer.
1189
    #       Should only be one - but if the users have been bad
1190
    #       Should only be one - but if the users have been bad
1190
    #       then there may be more.
1191
    #       then there may be more.
1191
    #
1192
    #
1192
    foreach my $srcFile ( reverse @{$data->{files}} )
1193
    if ( $data->{files} )
1193
    {
1194
    {
1194
        Verbose("importTagChanges: $srcFile");
-
 
1195
        my $sfile = $svnSession->FullPath() . '/' . $srcFile;
-
 
1196
        if ( $opt_branch )
-
 
1197
        {
-
 
1198
            $srcFile =~ m~tags/.*?(/.*)@\d+~;
1195
        foreach my $srcFile ( reverse @{$data->{files}} )
1199
            my $tfile = $1;
-
 
1200
            $svnSession->SvnSwitch ($sfile, $workSpace . $tfile);
-
 
1201
        }
-
 
1202
        else
-
 
1203
        {
1196
        {
-
 
1197
            Verbose("importTagChanges: $srcFile");
-
 
1198
            my $sfile = $svnSession->FullPath() . '/' . $srcFile;
-
 
1199
            if ( $opt_branch )
-
 
1200
            {
-
 
1201
                $srcFile =~ m~tags/.*?(/.*)@\d+~;
-
 
1202
                my $tfile = $1;
1204
            $svnSession->SvnCo ($sfile, $workSpace, '--Export', '--Force', '--PreText=Replacing ' );
1203
                $svnSession->SvnSwitch ($sfile, $workSpace . $tfile);
-
 
1204
            }
-
 
1205
            else
-
 
1206
            {
-
 
1207
                $svnSession->SvnCo ($sfile, $workSpace,
-
 
1208
                                        'export' => 1,
-
 
1209
                                        'force' => 1,
-
 
1210
                                        'pretext' => 'Replacing ' );
-
 
1211
            }
1205
        }
1212
        }
1206
    }
1213
    }
1207
}
1214
}
1208
 
1215
 
1209
#-------------------------------------------------------------------------------
1216
#-------------------------------------------------------------------------------
Line 1500... Line 1507...
1500
    Verbose0 ('devBranch         :', $devBranch);
1507
    Verbose0 ('devBranch         :', $devBranch);
1501
    Verbose0 ('devBranchPeg      :', $devBranchPeg);
1508
    Verbose0 ('devBranchPeg      :', $devBranchPeg);
1502
    Verbose0 ('devBranchHead     :', $devBranchHead);
1509
    Verbose0 ('devBranchHead     :', $devBranchHead);
1503
    Verbose0 ('tagLabel          :', $tagLabel);
1510
    Verbose0 ('tagLabel          :', $tagLabel);
1504
    Verbose0 ('tagPeg            :', $tagPeg);
1511
    Verbose0 ('tagPeg            :', $tagPeg);
1505
??    Verbose0 ('tagLabelDistance  :', $tagLabelDistance);
-
 
1506
    Verbose0 ('tagLabelBranch    :', $tagLabelBranch);
1512
    Verbose0 ('tagLabelBranch    :', $tagLabelBranch);
1507
    Verbose0 ('tagLabelBranchPeg :', $tagLabelBranchPeg);
1513
    Verbose0 ('tagLabelBranchPeg :', $tagLabelBranchPeg);
1508
}
1514
}
1509
 
1515
 
1510
#-------------------------------------------------------------------------------
1516
#-------------------------------------------------------------------------------