Subversion Repositories DevTools

Rev

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

Rev 5061 Rev 5169
Line 15... Line 15...
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
-
 
20
<!--#include file="common/release_changed.asp"-->
20
<%
21
<%
21
' Set rfile parameter. This is a return page after Login
22
' Set rfile parameter. This is a return page after Login
22
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
23
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
23
'------------ ACCESS CONTROL ------------------
24
'------------ ACCESS CONTROL ------------------
24
%>
25
%>
Line 57... Line 58...
57
parBuildType = Request("build_type")
58
parBuildType = Request("build_type")
58
 
59
 
59
'----------------------------------------------
60
'----------------------------------------------
60
%>
61
%>
61
<%
62
<%
-
 
63
'----------------------------------------------
-
 
64
'   Appears to be a 'Replace Version'
-
 
65
'   Args:   SSnewver            - New Version String (may be empty)
-
 
66
'           NNorig_pv_id        - original PVID
-
 
67
'           NNSetToPv_id        - New PVID
-
 
68
'           NNrtag_id           - Release Identifier
-
 
69
'           sSyncRtags          - Not Used any more
-
 
70
'           retNEWpv_id         - Return the PVID of the (replaced) package
-
 
71
'
-
 
72
   
62
Sub New_Version ( SSnewver, NNorig_pv_id, NNSetToPv_id, NNrtag_id, sSyncRtags, retNEWpv_id )
73
Sub New_Version ( SSnewver, NNorig_pv_id, NNSetToPv_id, NNrtag_id, sSyncRtags, retNEWpv_id )
63
   Dim cAlterReleaseWhileRestrictive, rsQry
74
   Dim cAlterReleaseWhileRestrictive, rsQry
64
   Dim Original_SSnewver
75
   Dim Original_SSnewver
65
   Dim newPkgVersion
76
   Dim newPkgVersion
66
   Original_SSnewver = SSnewver
77
   Original_SSnewver = SSnewver
Line 104... Line 115...
104
   ' The new package may be based on an existing package
115
   ' The new package may be based on an existing package
105
   '    Get the information on the existing package
116
   '    Get the information on the existing package
106
   Set rsQry = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_CONTENT WHERE RTAG_ID ="& Request("rtag_id") &" AND PV_ID = "& NNorig_pv_id &"", cint(0))
117
   Set rsQry = OraDatabase.DbCreateDynaset("SELECT * FROM RELEASE_CONTENT WHERE RTAG_ID ="& Request("rtag_id") &" AND PV_ID = "& NNorig_pv_id &"", cint(0))
107
 
118
 
108
   '  If the previous version exists and it is deprecated then ...
119
   '  If the previous version exists and it is deprecated then ...
-
 
120
   '    What is so special about a deprecated package. The '...', on the previous line, 
-
 
121
   '    is not very useful
-
 
122
   '
-
 
123
   '  Not sure that we can even get here
-
 
124
   '  Whatever '6' means - it is not for deprecated packages
-
 
125
   '
109
   If (NOT IsNull(rsQry("pkg_id"))) AND rsQry("pkg_state") = 6  Then
126
   If (NOT IsNull(rsQry("pkg_id"))) AND rsQry("pkg_state") = 6  Then
110
 
127
 
111
      Dim rsPv_id
128
      Dim rsPv_id
112
 
129
 
113
      If (SSnewver) <> ""  Then
130
      If (SSnewver) <> ""  Then
Line 145... Line 162...
145
         retNEWpv_id = OraDatabase.Parameters("RETPV_ID").Value
162
         retNEWpv_id = OraDatabase.Parameters("RETPV_ID").Value
146
 
163
 
147
      End If
164
      End If
148
   Else
165
   Else
149
 
166
 
150
      ' Create a new version of the package
167
      ' Create a new version of the package (if It does not exist)
-
 
168
      ' Check that we can update the release
-
 
169
      ' Replace package in the release
151
      '
170
      '
152
      OraDatabase.ExecuteSQL _
171
      OraDatabase.ExecuteSQL _
153
      "BEGIN "&_
172
      "BEGIN "&_
154
      " PK_PACKAGE.NEW_VERSION ( :ORIG_PV_ID, "&_
173
      " PK_PACKAGE.NEW_VERSION ( :ORIG_PV_ID, "&_
155
                               " :PKG_VERSION,"&_
174
                               " :PKG_VERSION,"&_
Line 284... Line 303...
284
'Dim Item
303
'Dim Item
285
'For Each Item In Request.Form
304
'For Each Item In Request.Form
286
'    Response.Write "User Data: " &Item & ": " & Request.Form(Item) & "<br>"
305
'    Response.Write "User Data: " &Item & ": " & Request.Form(Item) & "<br>"
287
'Next
306
'Next
288
'Response.Write "------------<br></pre>"
307
'Response.Write "------------<br></pre>"
-
 
308
'Response.End
289
 
309
 
290
'--- Process submission ---
310
'--- Process submission ---
291
If ((parNewPackage <> "") AND parNewPackage) Then
311
If ((parNewPackage <> "") AND parNewPackage) Then
292
    '
312
    '
293
    ' Creating a new package and its first version
313
    ' Creating a new package and its first version
Line 420... Line 440...
420
         If Record_Count > 0 And parBuildType = "M" Then
440
         If Record_Count > 0 And parBuildType = "M" Then
421
            Call RaiseMsg ( enum_MSG_PACKAGE_VERSION_EXISTS&"?rtag_id="& parRtag_id &"&pv_id="& parOLDpv_id &"", parFRnewver )
441
            Call RaiseMsg ( enum_MSG_PACKAGE_VERSION_EXISTS&"?rtag_id="& parRtag_id &"&pv_id="& parOLDpv_id &"", parFRnewver )
422
         Else
442
         Else
423
            Call New_Version ( parFRnewver, parOLDpv_id, parSetToPv_id, parRtag_id, parSync_rtags, NEWpv_id )
443
            Call New_Version ( parFRnewver, parOLDpv_id, parSetToPv_id, parRtag_id, parSync_rtags, NEWpv_id )
424
 
444
 
-
 
445
            ' Report change to Release archive server so that it can be synced
-
 
446
            Dim objRC: Set objRC = New ReleaseChanged
-
 
447
            Call objRC.Run_ReleaseChanged(parRtag_id,parSetToPv_id,enumRELEASE_CHANGE_MODE_PKG_ADDED, true)
-
 
448
            Call objRC.Run_ReleaseChanged(parRtag_id,parOLDpv_id,enumRELEASE_CHANGE_MODE_PKG_REMOVED, true)
-
 
449
            Set objRC = Nothing
-
 
450
 
425
            If objEH.Finally Then
451
            If objEH.Finally Then
426
               Response.Redirect("dependencies.asp?rtag_id="& parRtag_id &"&pv_id="& NEWpv_id )
452
               Response.Redirect("dependencies.asp?rtag_id="& parRtag_id &"&pv_id="& NEWpv_id )
427
            End If
453
            End If
428
         End If
454
         End If
429
      Else
455
      Else