Subversion Repositories DevTools

Rev

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

Rev 6480 Rev 6497
Line 54... Line 54...
54
                                                       '<br><br>NOTE:<br>Derivation of this has no sensitivity to the selected release.');
54
                                                       '<br><br>NOTE:<br>Derivation of this has no sensitivity to the selected release.');
55
 
55
 
56
formTips.tips.PreviousNonRippleVcsTag= newTip(-150, 20, 200, 10, 'PREVIOUS NON RIPPLE VCS TAG',
56
formTips.tips.PreviousNonRippleVcsTag= newTip(-150, 20, 200, 10, 'PREVIOUS NON RIPPLE VCS TAG',
57
                                                       'This is the vcs tag of the preceding significant (non-ripple) change that led to the current package version.'+
57
                                                       'This is the vcs tag of the preceding significant (non-ripple) change that led to the current package version.'+
58
                                                       '<br><br>NOTE:<br>Derivation of this has no sensitivity to the selected release.');
58
                                                       '<br><br>NOTE:<br>Derivation of this has no sensitivity to the selected release.');
-
 
59
formTips.tips.CreationHints= newTip(-150, 20, 200, 10, 'HINTS FOR PACKAGE CREATION',
-
 
60
                                                       'These are not correct commands. They are command hints to assist in creating a new package.');
-
 
61
 
59
 
62
 
60
</script>
63
</script>
61
<%
64
<%
62
'----------------------------------------------------------------------------------------------------------------------------------------
65
'----------------------------------------------------------------------------------------------------------------------------------------
63
Function asDepIss ( SSiss_db_id, SScolumn )
66
Function asDepIss ( SSiss_db_id, SScolumn )
Line 383... Line 386...
383
   Dim pkg_vcs_tag: pkg_vcs_tag = Get_Pkg_Vcs_Tag(Request("pv_id"))
386
   Dim pkg_vcs_tag: pkg_vcs_tag = Get_Pkg_Vcs_Tag(Request("pv_id"))
384
   Dim ii: ii = -1
387
   Dim ii: ii = -1
385
   Dim baseCmd
388
   Dim baseCmd
386
   sjats_extractable = false
389
   sjats_extractable = false
387
 
390
 
-
 
391
   sjats_cmds_qh = vcsInfoCollector.Item("vcs_tag")
-
 
392
   If ( sjats_cmds_qh = "CC" OR sjats_cmds_qh = "SVN" ) Then
-
 
393
      sjats_extractable = true
-
 
394
   End If
-
 
395
 
388
   ' if not released then use last package version vcs tag and branch else use current vcs tag
396
   ' if not released then use last package version vcs tag and branch else use current vcs tag
389
   If dlocked <> "Y" Then
397
   If dlocked <> "Y" Then
390
     ' not released, so get last package version id
398
     ' not released, so get last package version id
391
 
399
 
392
     Dim last_version_valid: last_version_valid = NOT IsNull(pkgInfoHash.Item ("previous_version"))
400
     Dim last_version_valid
393
     Dim last_pv_id: last_pv_id = pkgInfoHash.Item("last_pv_id")
401
     Dim last_pv_id: last_pv_id = pkgInfoHash.Item("last_pv_id")
394
     Dim last_pkg_vcs_tag: last_pkg_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
402
     Dim last_pkg_vcs_tag
395
     Dim VcsType
403
     Dim VcsType
396
 
404
 
-
 
405
     last_version_valid = TRUE
-
 
406
     If IsNull(pkgInfoHash.Item ("previous_version")) Then
-
 
407
         last_version_valid = FALSE
-
 
408
     ElseIf last_pv_id = pkgInfoHash.Item ("pv_id") Then
-
 
409
         last_version_valid = FALSE
-
 
410
     ElseIf pkgInfoHash.Item ("pkg_count") = 1 Then 
-
 
411
         last_version_valid = FALSE
-
 
412
     End If
-
 
413
 
-
 
414
     If last_version_valid Then
-
 
415
         last_pkg_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
-
 
416
     End If
-
 
417
 
397
     If (last_version_valid AND last_pkg_vcs_tag <> "") Then
418
     If (last_version_valid AND last_pkg_vcs_tag <> "") Then
398
        VcsType = Mid(last_pkg_vcs_tag, 1, InStr(1, last_pkg_vcs_tag, "::") - 1 )
419
        VcsType = Mid(last_pkg_vcs_tag, 1, InStr(1, last_pkg_vcs_tag, "::") - 1 )
399
        sjats_cmds_qh = VcsType
420
        sjats_cmds_qh = VcsType
400
        baseCmd =  "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """"
421
        baseCmd =  "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """"
401
        ii = ii+1 : sjats_cmds(ii) = baseCmd
422
        ii = ii+1 : sjats_cmds(ii) = baseCmd
402
 
423
 
403
         ' ClearCase extraction may get a project specific branch appended
424
         ' ClearCase extraction may get a project specific branch appended
404
         ' This will be used to automatically branch the files in the package
425
         ' This will be used to automatically branch the files in the package
405
         '
426
         '
406
         If (VcsType = "CC") Then
427
         If (VcsType = "CC") Then
407
             sjats_extractable = true
-
 
408
             Call Query_Config_Spec (Request("rtag_id"), last_pv_id)
428
             Call Query_Config_Spec (Request("rtag_id"), last_pv_id)
409
             Dim config_branch: config_branch = rsQry("config_spec_branch")
429
             Dim config_branch: config_branch = rsQry("config_spec_branch")
410
             If NOT IsNull(config_branch) AND (config_branch <> "") Then
430
             If NOT IsNull(config_branch) AND (config_branch <> "") Then
411
                 ii = ii+1 : sjats_cmds(ii) = baseCmd & " -branch " & config_branch
431
                 ii = ii+1 : sjats_cmds(ii) = baseCmd & " -branch " & config_branch
412
             End If
432
             End If
413
         End If
433
         End If
414
 
434
 
415
         If (VcsType = "SVN") Then
435
         If (VcsType = "SVN") Then
416
            sjats_extractable = true
-
 
417
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tag"
436
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tag"
418
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tip"
437
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tip"
419
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Work"
438
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Work"
420
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Exact"
439
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Exact"
421
         End If
440
         End If
422
     Else
441
     Else
423
         ii = ii+1 : sjats_cmds(ii) = "No Previous version to extract"
442
         'ii = ii+1 : sjats_cmds(ii) = "No Previous version to extract"
424
     End If
443
     End If
425
 
444
 
426
     baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
445
     baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
427
     ii = ii+1 : sjats_cmds(ii) = baseCmd
446
     ii = ii+1 : sjats_cmds(ii) = baseCmd
428
     
447
     
429
   Else
448
   Else
430
    ' released
449
    ' released
431
    sjats_cmds_qh = vcsInfoCollector.Item("vcs_tag")
-
 
432
 
-
 
433
    if ( sjats_cmds_qh = "CC" OR sjats_cmds_qh = "SVN" ) Then
-
 
434
        sjats_extractable = true
450
    if sjats_extractable Then
435
        baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
451
        baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
436
        ii = ii+1 : sjats_cmds(ii) = baseCmd
452
        ii = ii+1 : sjats_cmds(ii) = baseCmd
437
    Else
453
    Else
438
        baseCmd =  "Cannot be extracted with JATS"
454
        baseCmd =  "Cannot be extracted with JATS"
439
        ii = ii+1 : sjats_cmds(ii) = baseCmd
455
        ii = ii+1 : sjats_cmds(ii) = baseCmd
Line 610... Line 626...
610
 
626
 
611
     getLinkUrl = getLinkUrl + joiner + "pv_id=" + pvid
627
     getLinkUrl = getLinkUrl + joiner + "pv_id=" + pvid
612
End Function
628
End Function
613
'-------------------------------------------------
629
'-------------------------------------------------
614
'   DisplayVersionRow   - Display a row of vesrion information
630
'   DisplayVersionRow   - Display a row of vesrion information
615
'       pvid    - pvid to process
631
'       pvid    - pvid to process. Null -> "Initial Version"
616
'       title   - row title
632
'       title   - row title
617
'       helpTag - Tag for help
633
'       helpTag - Tag for help
618
'
634
'
619
Sub DisplayVersionRow( pvid, title, helpTag )
635
Sub DisplayVersionRow( pvid, title, helpTag )
620
      Dim   versionText
636
      Dim   versionText
621
      Dim   tagText
637
      Dim   tagText
622
      Dim   showLink
638
      Dim   showLink
623
      Dim   clipClass
639
      Dim   clipClass
624
      Dim   ExtractText
640
      Dim   ExtractText
625
      Dim   queryResult
641
      Dim   queryResult
626
      Set   queryResult = OraDatabase.DbCreateDynaset( "SELECT pkg_version from package_versions where pv_id =" & pvid , cint(0))
-
 
627
 
642
 
628
      If (NOT queryResult.BOF ) AND (NOT queryResult.EOF) Then
643
      If IsNull(pvid) Then
629
        versionText = queryResult("pkg_version")
644
          versionText = "Initial Version"
630
        tagText = Get_Pkg_Vcs_Tag(pvid)
645
          tagText = NULL
631
        showLink = isDefined("showPrevVerLinks") 
646
          showLink = FALSE
632
      Else
647
      Else
-
 
648
          Set   queryResult = OraDatabase.DbCreateDynaset( "SELECT pkg_version from package_versions where pv_id =" & pvid , cint(0))
-
 
649
 
-
 
650
          If (NOT queryResult.BOF ) AND (NOT queryResult.EOF) Then
-
 
651
            versionText = queryResult("pkg_version")
-
 
652
            tagText = Get_Pkg_Vcs_Tag(pvid)
-
 
653
            showLink = isDefined("showPrevVerLinks") 
-
 
654
          Else
633
        versionText = "Unknown"
655
            versionText = "Unknown"
634
        tagText = NULL
656
            tagText = NULL
635
        showLink = FALSE
657
            showLink = FALSE
-
 
658
          End If
-
 
659
 
-
 
660
          queryResult.Close()
-
 
661
          Set queryResult = nothing
-
 
662
 
636
      End If
663
     End If
637
 
664
 
638
      If sjats_extractable Then
665
      If sjats_extractable Then
639
        clipClass = "clip"
666
        clipClass = "clip"
640
        ExtractText = NewLine_To_BR ( To_HTML(tagText) ) 
667
        ExtractText = NewLine_To_BR ( To_HTML(tagText) ) 
641
      Else
668
      Else
Line 664... Line 691...
664
                </tr>
691
                </tr>
665
              </table>
692
              </table>
666
            </td>
693
            </td>
667
         </tr>
694
         </tr>
668
      <%
695
      <%
-
 
696
End Sub
-
 
697
 
-
 
698
'-------------------------------------------------
-
 
699
'   DisplayCreationCommands
-
 
700
'   Display commands that may be useful in the creation of the package
-
 
701
'
-
 
702
Sub DisplayCreationCommands
-
 
703
    Dim tagText
-
 
704
    Dim VcsType
-
 
705
    Dim title: title = "Package Creation Hints"
-
 
706
    Dim SvnUrl
-
 
707
    Dim SvnLabel
-
 
708
 
-
 
709
    tagText = Get_Pkg_Vcs_Tag(pkgInfoHash.Item("pv_id"))
-
 
710
    VcsType = Mid(tagText, 1, InStr(1, tagText, "::") - 1 )
669
      queryResult.Close()
711
    If VcsType = "SVN" Then
-
 
712
        If pkgInfoHash.Item("src_path") <> "" Then
-
 
713
            SvnUrl = pkgInfoHash.Item("src_path")
-
 
714
            Dim lastBit: lastBit = InStrRev(SvnUrl, "/" )
670
      Set queryResult = nothing
715
            If lastBit > 1 Then
-
 
716
                SvnUrl = Left(SvnUrl, lastBit-1) 
-
 
717
            End If
-
 
718
        Else
-
 
719
            SvnUrl = "AUPERASVN0X/RepoName/" & pkgInfoHash.Item ("pkg_name")
-
 
720
        End If
-
 
721
        If pkgInfoHash.Item("pkg_label") <> "" Then
-
 
722
            SvnLabel = pkgInfoHash.Item("pkg_label") 
-
 
723
        Else
-
 
724
            SvnLabel = "SomeLabel.WIP"
-
 
725
        End If
-
 
726
 
-
 
727
      %>
-
 
728
         <tr>
-
 
729
            <td width="20%" bgcolor=#e4e9ec class="sublbox_txt" valign="top"><strong><%=title%></strong><%=Quick_Help("CreationHints")%></td>
-
 
730
            <td bgcolor=#f5f5f5 class="sublbox_txt">
-
 
731
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
-
 
732
                  <tr><td nowrap class="sublbox_txt clip"> jats svn create_package -new <%=SvnUrl%> </td></tr>
-
 
733
                  <tr><td nowrap class="sublbox_txt clip"> jats svn create_package -new <%=SvnUrl%> -import=&lt;PkgDir&gt; </td></tr>
-
 
734
                  <tr><td nowrap class="sublbox_txt clip"> jats svn create_package -new <%=SvnUrl%> -label=<%=SvnLabel%> -import=&lt;PkgDir&gt; </td></tr>
-
 
735
                  <tr><td nowrap class="sublbox_txt clip"> jats svn create_package -new <%=SvnUrl%> -label=<%=SvnLabel%> -import=<%=pkgInfoHash.Item ("pkg_name")%> </td></tr>
-
 
736
              </table>
-
 
737
            </td>
-
 
738
         </tr>
-
 
739
      <%
-
 
740
    End If
671
End Sub
741
End Sub
672
%>
742
%>
673
<%
743
<%
674
'------------------ MAIN LINE --------------------
744
'------------------ MAIN LINE --------------------
675
'-------------------------------------------------
745
'-------------------------------------------------
Line 1042... Line 1112...
1042
      <%
1112
      <%
1043
      ' Get JATS extraction commands
1113
      ' Get JATS extraction commands
1044
      Dim  sjats_cmd_test, sjats_cmds_qh, sjats_extractable
1114
      Dim  sjats_cmd_test, sjats_cmds_qh, sjats_extractable
1045
      ReDim sjats_cmds(6)
1115
      ReDim sjats_cmds(6)
1046
      call Jats_Extract_Command(sjats_cmds, sjats_cmd_test, sjats_cmds_qh, sjats_extractable)
1116
      call Jats_Extract_Command(sjats_cmds, sjats_cmd_test, sjats_cmds_qh, sjats_extractable)
-
 
1117
      Dim PrevVerTitle : PrevVerTitle = "Previous Version:"
1047
 
1118
 
1048
      ' Previous Versions 
1119
      ' Previous Versions 
1049
      If IsNull(pkgInfoHash.Item ("is_patch")) Then
1120
      If pkgInfoHash.Item ("pkg_count") = 1 Then
1050
        Dim PrevVerTitle : PrevVerTitle = "Previous Version:"
1121
        Call DisplayVersionRow(NULL, PrevVerTitle, "PreviousVcsTag")
-
 
1122
        Call DisplayCreationCommands()
-
 
1123
 
-
 
1124
      ElseIf IsNull(pkgInfoHash.Item ("is_patch")) Then
1051
 
1125
 
1052
        If canActionControlInProject("ChangePreviousVersion") AND NOT pkgInfoHash.Item("is_sdkpkg") Then
1126
        If canActionControlInProject("ChangePreviousVersion") AND NOT pkgInfoHash.Item("is_sdkpkg") Then
1053
            sonclick="MM_openVixIFrame('_wform_change_previous_version.asp?rfile="& scriptName &"&pv_id="& parPv_id &"&rtag_id="& parRtag_id &"','Change Previous Version')"
1127
            sonclick="MM_openVixIFrame('_wform_change_previous_version.asp?rfile="& scriptName &"&pv_id="& parPv_id &"&rtag_id="& parRtag_id &"','Change Previous Version')"
1054
            PrevVerTitle = "<a href='javascript:;' onClick=""" & sonclick & """ class='sublbox_txt'> " & PrevVerTitle & " <img src='images/i_edit.gif' width='12' height='12' border='0' alt='Edit'></a>"
1128
            PrevVerTitle = "<a href='javascript:;' onClick=""" & sonclick & """ class='sublbox_txt'> " & PrevVerTitle & " <img src='images/i_edit.gif' width='12' height='12' border='0' alt='Edit'></a>"
1055
        Else
1129
        Else
Line 1092... Line 1166...
1092
 
1166
 
1093
      <%
1167
      <%
1094
      ' Beyond Compare difference command
1168
      ' Beyond Compare difference command
1095
      Dim prevVcsTag
1169
      Dim prevVcsTag
1096
      Dim curVcsTag
1170
      Dim curVcsTag
1097
      Dim sBcCmd 
1171
      Dim sBcCmd, sBcClass 
1098
 
1172
 
1099
      prevVcsTag = Get_Pkg_Vcs_Tag(iLastSignificantPVID)
1173
      prevVcsTag = Get_Pkg_Vcs_Tag(iLastSignificantPVID)
1100
      curVcsTag = Get_Pkg_Vcs_Tag(parPv_id)
1174
      curVcsTag = Get_Pkg_Vcs_Tag(parPv_id)
1101
      sBcCmd = ""
1175
      sBcCmd = ""
-
 
1176
      sBcClass = ""
1102
 
1177
 
-
 
1178
      If pkgInfoHash.Item ("pkg_count") = 1 Then
-
 
1179
            sBcCmd = "No prior version compare against"
1103
      If (IsNull(prevVcsTag) OR prevVcsTag = "" ) Then
1180
      ElseIf (IsNull(prevVcsTag) OR prevVcsTag = "" ) Then
1104
            sBcCmd = "No prior label to compare against"
1181
            sBcCmd = "No prior label to compare against"
1105
      ElseIf (IsNull(curVcsTag) OR curVcsTag = "" ) Then
1182
      ElseIf (IsNull(curVcsTag) OR curVcsTag = "" ) Then
1106
            sBcCmd = "Current VCS tag not yet specified"
1183
            sBcCmd = "Current VCS tag not yet specified"
1107
      ElseIf (not sjats_extractable) Then
1184
      ElseIf (not sjats_extractable) Then
1108
            sBcCmd = "Cannot be extracted with JATS"
1185
            sBcCmd = "Cannot be extracted with JATS"
1109
      Else
1186
      Else
1110
            sBcCmd = "jats vcsdiff -old=" & prevVcsTag & " -new=" & curVcsTag
1187
            sBcCmd = "jats vcsdiff -old=" & prevVcsTag & " -new=" & curVcsTag
-
 
1188
            sBcClass = "clip"
1111
      End If
1189
      End If
1112
      sBcCmd = NewLine_To_BR( To_HTML (sBcCmd) )
1190
      sBcCmd = NewLine_To_BR( To_HTML (sBcCmd) )
1113
 
1191
 
1114
      ' Codestriker commands - Only for ClearCase
1192
      ' Codestriker commands - Only for ClearCase
1115
      Dim sCsCmd, sCsClass
1193
      Dim sCsCmd, sCsClass
Line 1139... Line 1217...
1139
      </tr>
1217
      </tr>
1140
      <tr>
1218
      <tr>
1141
        <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
1219
        <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
1142
          <strong>Beyond Compare command:</strong><%=Quick_Help ( "BeyondCompare" )%>
1220
          <strong>Beyond Compare command:</strong><%=Quick_Help ( "BeyondCompare" )%>
1143
        </td>
1221
        </td>
1144
        <td bgcolor=#f5f5f5 class="sublbox_txt clip">
1222
        <td bgcolor=#f5f5f5 class="sublbox_txt <%=sBcClass%>">
1145
          <%=sBcCmd%>
1223
          <%=sBcCmd%>
1146
        </td>
1224
        </td>
1147
      </tr>
1225
      </tr>
1148
              
1226
              
1149
 
1227