Subversion Repositories DevTools

Rev

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

Rev 1277 Rev 1376
Line 461... Line 461...
461
   OraDatabase.Parameters.Remove "PV_ID"
461
   OraDatabase.Parameters.Remove "PV_ID"
462
End Sub
462
End Sub
463
 
463
 
464
'---------------------------------------------------------------
464
'---------------------------------------------------------------
465
' Returns the jats extraction commands
465
' Returns the jats extraction commands
466
Sub Jats_Extract_Command (ByRef ajats_cmd, ByRef ajats_cmd_test)
466
Sub Jats_Extract_Command (ByRef sjats_cmds(), ByRef ajats_cmd_test, ByRef sjats_cmds_qh)
467
   Dim dlocked: dlocked = pkgInfoHash.Item("dlocked")
467
   Dim dlocked: dlocked = pkgInfoHash.Item("dlocked")
468
   
-
 
469
   Dim pkg_vcs_tag: pkg_vcs_tag = Get_Pkg_Vcs_Tag(Request("pv_id"))
468
   Dim pkg_vcs_tag: pkg_vcs_tag = Get_Pkg_Vcs_Tag(Request("pv_id"))
-
 
469
   Dim ii: ii = -1
-
 
470
   Dim baseCmd
470
 
471
 
471
   ' if not released then use last package version vcs tag and branch else use current vcs tag
472
   ' if not released then use last package version vcs tag and branch else use current vcs tag
472
   If dlocked <> "Y" Then
473
   If dlocked <> "Y" Then
473
     ' not released, so get last package version id
474
     ' not released, so get last package version id
-
 
475
 
474
     Dim last_pv_id: last_pv_id = pkgInfoHash.Item("last_pv_id")
476
     Dim last_pv_id: last_pv_id = pkgInfoHash.Item("last_pv_id")
475
     Dim last_pkg_vcs_tag: last_pkg_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
477
     Dim last_pkg_vcs_tag: last_pkg_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
-
 
478
     Dim VcsType
-
 
479
     If (last_pkg_vcs_tag <> "") Then
-
 
480
         VcsType = Mid(last_pkg_vcs_tag, 1, InStr(1, last_pkg_vcs_tag, "::") - 1 )
-
 
481
         sjats_cmds_qh = VcsType
-
 
482
 
-
 
483
         baseCmd =  "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """"
-
 
484
         ii = ii+1 : sjats_cmds(ii) = baseCmd
-
 
485
 
-
 
486
         ' ClearCase extraction may get a project specific branch appended
-
 
487
         ' This will be used to automatically branch the files in the package
-
 
488
         '
-
 
489
         If (VcsType = "CC") Then
476
     Call Query_Config_Spec (Request("rtag_id"), last_pv_id)
490
             Call Query_Config_Spec (Request("rtag_id"), last_pv_id)
477
     Dim config_branch: config_branch = rsQry("config_spec_branch")
491
             Dim config_branch: config_branch = rsQry("config_spec_branch")
-
 
492
             If NOT IsNull(config_branch) AND (config_branch <> "") Then
-
 
493
                 ii = ii+1 : sjats_cmds(ii) = baseCmd & " -branch " & config_branch
-
 
494
             End If
-
 
495
         End If
478
 
496
 
-
 
497
         If (VcsType = "SVN") Then
-
 
498
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tag"
479
     If NOT IsNull(config_branch) AND (config_branch <> "") Then
499
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tip"
-
 
500
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Work"
480
       ajats_cmd =   "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """ -branch " & config_branch
501
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Exact"
-
 
502
         End If
481
     Else
503
     Else
482
       ajats_cmd =   "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """"
504
         ii = ii+1 : sjats_cmds(ii) = "No Previous version to extract"
483
     End If
505
     End If
-
 
506
 
-
 
507
     baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
-
 
508
     ii = ii+1 : sjats_cmds(ii) = baseCmd
-
 
509
     
484
   Else
510
   Else
485
     ' released
511
     ' released
486
     ajats_cmd =   "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
512
     baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
-
 
513
     ii = ii+1 : sjats_cmds(ii) = baseCmd
-
 
514
     sjats_cmds_qh = vcsInfoCollector.Item("vcs_tag")
-
 
515
 
487
   End If
516
   End If
488
 
517
 
-
 
518
   ' Test Command
489
   ajats_cmd_test = "jats vcsrelease -test -label """ & pkg_vcs_tag & """"
519
   ajats_cmd_test = "jats vcsrelease -test -label """ & pkg_vcs_tag & """"
490
 
520
 
-
 
521
   ReDim Preserve sjats_cmds(ii)
491
   rsQry.Close()
522
   rsQry.Close()
492
   Set rsQry = nothing
523
   Set rsQry = nothing
493
 
524
 
494
End Sub
525
End Sub
495
 
526
 
496
'---------------------------------------------------------------
527
'---------------------------------------------------------------
497
' Returns the VCS tag for the specified package version
528
' Returns the VCS tag for the specified package version
498
Function Get_Pkg_Vcs_Tag(apv_id)
529
Function Get_Pkg_Vcs_Tag(apv_id)
499
   OraDatabase.Parameters.Add "PV_ID", apv_id, ORAPARM_INPUT, ORATYPE_NUMBER
530
   OraDatabase.Parameters.Add "PV_ID", apv_id, ORAPARM_INPUT, ORATYPE_NUMBER
500
   OraDatabase.Parameters.Add "RETURN_CODE","", ORAPARM_OUTPUT, ORATYPE_VARCHAR2
531
   OraDatabase.Parameters.Add "RETURN_CODE","", ORAPARM_OUTPUT, ORATYPE_VARCHAR2
-
 
532
   On Error Resume Next
501
   OraDatabase.ExecuteSQL ("BEGIN   :RETURN_CODE := PK_RMAPI.RETURN_VCS_TAG( :PV_ID );   END;")
533
        OraDatabase.ExecuteSQL ("BEGIN   :RETURN_CODE := PK_RMAPI.RETURN_VCS_TAG( :PV_ID );   END;")
502
   Get_Pkg_Vcs_Tag = OraDatabase.Parameters("RETURN_CODE").Value
534
        Get_Pkg_Vcs_Tag = OraDatabase.Parameters("RETURN_CODE").Value
-
 
535
   On Error Goto 0
503
   OraDatabase.Parameters.Remove "PV_ID"
536
   OraDatabase.Parameters.Remove "PV_ID"
504
   OraDatabase.Parameters.Remove "RETURN_CODE"
537
   OraDatabase.Parameters.Remove "RETURN_CODE"
505
End Function
538
End Function
506
 
539
 
507
'----------------------------------------------------------------------------------------------------------------------------------------
540
'----------------------------------------------------------------------------------------------------------------------------------------
Line 694... Line 727...
694
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
727
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
695
            <td bgcolor=#f5f5f5 class="sublbox_txt">
728
            <td bgcolor=#f5f5f5 class="sublbox_txt">
696
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
729
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
697
            </td>
730
            </td>
698
         </tr>
731
         </tr>
699
      
732
 
700
         <tr>
733
         <tr>
701
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Label:</b></td>
734
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Source Path:</b> </td>
702
            <td bgcolor=#f5f5f5 class="sublbox_txt">
735
            <td bgcolor=#f5f5f5 class="sublbox_txt">
703
               <%If IsNull( rsQry("pkg_label") ) Then%>
736
               <%If IsNull( rsQry("src_path") ) Then%>
704
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
737
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
705
               <%End If%>
738
               <%End If%>
706
            </td>
739
            </td>
707
         </tr>
740
         </tr>
-
 
741
 
708
         <tr>
742
         <tr>
709
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Source Path:</b> </td>
743
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Label:</b></td>
710
            <td bgcolor=#f5f5f5 class="sublbox_txt">
744
            <td bgcolor=#f5f5f5 class="sublbox_txt">
711
               <%If IsNull( rsQry("src_path") ) Then%>
745
               <%If IsNull( rsQry("pkg_label") ) Then%>
712
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
746
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
713
               <%End If%>
747
               <%End If%>
714
            </td>
748
            </td>
715
         </tr>
749
         </tr>
716
      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG Then%>
750
      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG Then%>
717
         <tr>
751
         <tr>
718
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
752
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
719
            <td bgcolor=#f5f5f5 class="sublbox_txt">
753
            <td bgcolor=#f5f5f5 class="sublbox_txt">
720
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
754
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
721
            </td>
755
            </td>
722
         </tr>
756
         </tr>
-
 
757
 
723
         <tr>
758
         <tr>
724
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>SubVersion Tag:</b> </td>
759
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Source Path:</b> </td>
725
            <td bgcolor=#f5f5f5 class="sublbox_txt">
760
            <td bgcolor=#f5f5f5 class="sublbox_txt">
726
               <%If IsNull( rsQry("src_path") ) Then%>
761
               <%If IsNull( rsQry("src_path") ) Then%>
727
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
762
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
728
               <%End If%>
763
               <%End If%>
729
            </td>
764
            </td>
730
         </tr>
765
         </tr>
731
         <%If PackageExists(parRtag_id,parPv_id,"work_in_progress") Then%>
-
 
-
 
766
 
732
         <tr>
767
         <tr>
733
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>WIP Tag:</b> </td>
768
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Tag:</b></td>
734
            <td bgcolor=#f5f5f5 class="sublbox_txt">
769
            <td bgcolor=#f5f5f5 class="sublbox_txt">
735
               <%If IsNull( rsQry("pkg_label") ) Then%>
770
               <%If IsNull( rsQry("pkg_label") ) Then%>
736
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
771
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
737
               <%End If%>
772
               <%End If%>
738
            </td>
773
            </td>
739
         </tr>
774
         </tr>
740
         <%End If%>
-
 
-
 
775
 
741
      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG Then%>
776
      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG Then%>
742
         <tr>
777
         <tr>
743
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
778
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
744
            <td bgcolor=#f5f5f5 class="sublbox_txt">
779
            <td bgcolor=#f5f5f5 class="sublbox_txt">
745
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
780
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
Line 803... Line 838...
803
                  <%If (IsNull( rsQry("is_build_env_required") ) AND (rsQry("comments") <> "Rippled Build.")) Then%>
838
                  <%If (IsNull( rsQry("is_build_env_required") ) AND (rsQry("comments") <> "Rippled Build.")) Then%>
804
                     <span class='err_alert'>Required!</span>
839
                     <span class='err_alert'>Required!</span>
805
                  <%ElseIf rsQry("is_build_env_required") = enumDB_NO Then%>
840
                  <%ElseIf rsQry("is_build_env_required") = enumDB_NO Then%>
806
                     Not Required.
841
                     Not Required.
807
                  <%Else%>
842
                  <%Else%>
808
                     <table width="40%"  border="0" cellspacing="3" cellpadding="2">
843
                     <table width="40%"  border="0" cellspacing="0" cellpadding="1">
809
                        <%
844
                        <%
810
                        currG1 = 0
845
                        currG1 = 0
811
                        While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
846
                        While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
812
                           'retVal = Lookup_Document ( rsQry("doc_num"), sDocTitle, NULL, NULL, NULL  )
847
                           'retVal = Lookup_Document ( rsQry("doc_num"), sDocTitle, NULL, NULL, NULL  )
813
                        %>
848
                        %>
814
                           <%If currG1 <> CInt(rsTemp("bm_id")) Then%>
849
                           <%If currG1 <> CInt(rsTemp("bm_id")) Then%>
815
                              <tr>
850
                              <tr>
816
                                 <td colspan="2" nowrap class="sublbox_txt" bgcolor=#e4e9ec>
851
                                 <td colspan="2" nowrap class="sublbox_txt">
817
                                    <%=rsTemp("bm_name")%>&nbsp;<%=GetBuildType( rsTemp("bsa_id") )%>
852
                                    <%=rsTemp("bm_name")%>&nbsp;<%=GetBuildType( rsTemp("bsa_id") )%>
818
                                 </td>
853
                                 </td>
819
                              </tr>
854
                              </tr>
820
                              <%currG1 = CInt(rsTemp("bm_id"))
855
                              <%currG1 = CInt(rsTemp("bm_id"))
821
                           End If
856
                           End If
Line 912... Line 947...
912
      <%End If%>
947
      <%End If%>
913
 
948
 
914
      <tr>
949
      <tr>
915
         <%
950
         <%
916
         ' Get JATS extraction commands
951
         ' Get JATS extraction commands
917
         Dim sjats_cmd,sjats_cmd_test
952
         Dim  sjats_cmd_test, sjats_cmds_qh
-
 
953
         ReDim sjats_cmds(6)
918
         call Jats_Extract_Command(sjats_cmd,sjats_cmd_test)                     
954
         call Jats_Extract_Command(sjats_cmds, sjats_cmd_test, sjats_cmds_qh)
919
         %>
955
         %>
920
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
956
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt" valign="top">
921
           <strong>JATS extraction command:</strong>
957
           <strong>JATS extraction commands:</strong>
-
 
958
                <%=Quick_Help ( "JatsExtraction_" & sjats_cmds_qh )%>
922
         </td>
959
         </td>
-
 
960
         <td>
-
 
961
         <table class="embedded_table">
-
 
962
         <% Dim ii : For ii = 0 to UBound(sjats_cmds) %>
923
         <td bgcolor=#f5f5f5 class="sublbox_txt">
963
             <tr><td bgcolor=#f5f5f5 class="sublbox_txt">
924
           <%=NewLine_To_BR ( To_HTML(sjats_cmd) )%>
964
               <%=NewLine_To_BR ( To_HTML(sjats_cmds(ii)) )%>
-
 
965
             </td>
-
 
966
         <% Next %>
925
         </td>
967
         </td>
-
 
968
         </tr>
-
 
969
         </table>
926
      </tr>
970
      </tr>
927
      <tr>
971
      <tr>
928
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
972
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
929
           <strong>JATS Test:</strong>
973
           <strong>JATS Test:</strong><%=Quick_Help ( "JatsTest" )%>
930
         </td>
974
         </td>
931
         <td bgcolor=#f5f5f5 class="sublbox_txt">
975
         <td bgcolor=#f5f5f5 class="sublbox_txt">
932
           <%=NewLine_To_BR ( To_HTML(sjats_cmd_test) )%>
976
           <%=NewLine_To_BR ( To_HTML(sjats_cmd_test) )%>
933
         </td>
977
         </td>
934
      </tr>
978
      </tr>
935
 
979
 
936
      <%
980
      <%
937
      ' Codestriker and Beyond Compare differencing commands
981
      ' Beyond Compare difference command
938
      Dim oldLabel
-
 
939
      Dim old_vcs_tag
982
      Dim prevVcsTag
940
      Dim sCsCmd
983
      Dim curVcsTag
941
      Dim sBcCmd
984
      Dim sBcCmd
-
 
985
 
-
 
986
      prevVcsTag = Get_Pkg_Vcs_Tag(iLastSignificantPVID)
942
      sCsCmd = ""
987
      curVcsTag = Get_Pkg_Vcs_Tag(parPv_id)
943
      sBcCmd = ""
988
      sBcCmd = ""
-
 
989
 
-
 
990
      If (IsNull(prevVcsTag) OR prevVcsTag = "" ) Then
-
 
991
            sBcCmd = "No prior label to compare against"
-
 
992
      ElseIf (IsNull(curVcsTag) OR curVcsTag = "" ) Then
-
 
993
            sBcCmd = "Current VCS tag not yet specified"
-
 
994
      Else
-
 
995
            sBcCmd = "jats vcsdiff -old=" & prevVcsTag & " -new=" & curVcsTag
-
 
996
 
-
 
997
      End If
-
 
998
      sBcCmd = NewLine_To_BR( To_HTML (sBcCmd) )
-
 
999
 
-
 
1000
      ' Codestriker commands - Only for ClearCase
-
 
1001
      Dim sCsCmd
-
 
1002
      sCsCmd = ""
-
 
1003
 
944
      If vcsInfoCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG Then
1004
      If vcsInfoCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG Then
-
 
1005
         Dim oldLabel
-
 
1006
         Dim old_vcs_tag
945
         If (pv_id_exists(iLastSignificantPVID) = TRUE) Then
1007
         If (pv_id_exists(iLastSignificantPVID) = TRUE) Then
946
            old_vcs_tag = get_vcs_tag(iLastSignificantPVID)
1008
            old_vcs_tag = get_vcs_tag(iLastSignificantPVID)
947
            If (old_vcs_tag = enum_VCS_CLEARCASE_TAG) Then
1009
            If (old_vcs_tag = enum_VCS_CLEARCASE_TAG) Then
948
               oldLabel = get_Pkg_Label(iLastSignificantPVID)
1010
               oldLabel = get_Pkg_Label(iLastSignificantPVID)
949
               sCsCmd = NewLine_To_BR ( To_HTML( Codestriker_Command   (oldLabel, pkgInfoHash.Item("pkg_label")) ) )
1011
               sCsCmd = NewLine_To_BR ( To_HTML( Codestriker_Command (oldLabel, pkgInfoHash.Item("pkg_label")) ) )
950
               sBcCmd = NewLine_To_BR ( To_HTML( BeyondCompare_Command (oldLabel, pkgInfoHash.Item("pkg_label")) ) )
-
 
951
           End If
1012
           End If
952
         End If
1013
         End If
953
      End If%>
1014
      End If%>
954
               
1015
               
955
      <tr>
1016
      <tr>
Line 1003... Line 1064...
1003
      End If
1064
      End If
1004
      %>
1065
      %>
1005
   </table>
1066
   </table>
1006
   </fieldset>
1067
   </fieldset>
1007
   <br>
1068
   <br>
-
 
1069
 
1008
<!-- PACKAGE METRICS -------------------------------------------------------------------------------------------------------------------->
1070
<!-- PACKAGE METRICS -------------------------------------------------------------------------------------------------------------------->
1009
   <%If Request("rtag_id") <> "" Then%>
1071
   <%If Request("rtag_id") <> "" Then%>
1010
      <%
1072
      <%
1011
      Call GetPackageMetrics( parPv_id, rsPkgMetrics )
1073
      Call GetPackageMetrics( parPv_id, rsPkgMetrics )
1012
      %>
1074
      %>
Line 1560... Line 1622...
1560
                                 </td>
1622
                                 </td>
1561
                              <%Else%>
1623
                              <%Else%>
1562
                                 <td align="center" nowrap bgcolor=#e4e9ec></td>
1624
                                 <td align="center" nowrap bgcolor=#e4e9ec></td>
1563
                              <%End If%>
1625
                              <%End If%>
1564
                              <td bgcolor=#f5f5f5 nowrap class="form_item">
1626
                              <td bgcolor=#f5f5f5 nowrap class="form_item">
1565
                                 <a href="http://auperajir02:8080/browse/<%=rsCQ("iss_num")%>" target="_blank" class="txt_linked">
1627
                                 <a href="<%=JIRA_URL%>/browse/<%=rsCQ("iss_num")%>" target="_blank" class="txt_linked">
1566
                                    <%=rsCQ("iss_num")%>
1628
                                    <%=rsCQ("iss_num")%>
1567
                                 </a>
1629
                                 </a>
1568
                              </td>
1630
                              </td>
1569
                              <td bgcolor=#f5f5f5 class="form_item">JIRA</td>
1631
                              <td bgcolor=#f5f5f5 class="form_item">JIRA</td>
1570
                              <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>
1632
                              <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>