Subversion Repositories DevTools

Rev

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

Rev 6440 Rev 6480
Line 1551... Line 1551...
1551
'        could check to see if the word "ripple" appears in the
1551
'        could check to see if the word "ripple" appears in the
1552
'        comments field of the record set of the SWL query.  That
1552
'        comments field of the record set of the SWL query.  That
1553
'        might catch some of those records, but assumes the user
1553
'        might catch some of those records, but assumes the user
1554
'        wrote the wor ripple into the comments (reason for version).
1554
'        wrote the wor ripple into the comments (reason for version).
1555
'
1555
'
1556
Function getLastNonRippleVersionPVID( this_pv_id )
1556
Function getLastNonRippleVersionPVID( this_pv_id, ByRef rippleBasePvid, ByRef lastNonRipplePvid )
1557
   Dim queryResult
1557
   Dim queryResult
1558
   Dim queryString
1558
   Dim queryString
-
 
1559
   Dim lastNonRipple
1559
 
1560
 
1560
   ' default return value in case don't find anything
1561
   ' default return value in case don't find anything
1561
   getLastNonRippleVersionPVID = this_pv_id
1562
   getLastNonRippleVersionPVID = this_pv_id
-
 
1563
   lastNonRipple = this_pv_id
1562
 
1564
 
1563
   ' Get a list of all previous non-ripple builds starting with the current pvid
1565
   ' Get a list of all previous non-ripple builds starting with the current pvid
1564
   '    The first entry will be the base entry of the current ripple
1566
   '    The first entry will be the base entry of the current ripple
1565
   '    The second entry will be the previous significant entry
1567
   '    The second entry will be the previous significant entry
1566
   queryString = _
1568
   queryString = _
Line 1585... Line 1587...
1585
   Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
1587
   Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
1586
 
1588
 
1587
   ' First entry - Base of the current ripple (may be myself)
1589
   ' First entry - Base of the current ripple (may be myself)
1588
   If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
1590
   If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
1589
         getLastNonRippleVersionPVID = queryResult("pv_id")
1591
         getLastNonRippleVersionPVID = queryResult("pv_id")
-
 
1592
         lastNonRipple = queryResult("pv_id")
1590
 
1593
 
1591
        ' Second entry - Previous Non Ripple Entry
1594
        ' Second entry - Previous Non Ripple Entry
1592
        queryResult.MoveNext
1595
        queryResult.MoveNext
1593
        If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
1596
        If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
1594
            getLastNonRippleVersionPVID = queryResult("pv_id")
1597
            getLastNonRippleVersionPVID = queryResult("pv_id")
1595
        End If
1598
        End If
1596
   End If
1599
   End If
1597
 
1600
 
1598
   queryResult.Close()
1601
   queryResult.Close()
1599
   Set queryResult = nothing
1602
   Set queryResult = nothing
-
 
1603
 
-
 
1604
   If Not isNull(rippleBasePvid) Then rippleBasePvid = lastNonRipple 
-
 
1605
   If Not isNull(lastNonRipplePvid) Then lastNonRipplePvid = getLastNonRippleVersionPVID
-
 
1606
 
1600
End Function
1607
End Function
1601
 
1608
 
1602
 
1609
 
1603
Function getLastNonRippleVersionPVIDLimitedByDate( this_pv_id, limitDate )
1610
Function getLastNonRippleVersionPVIDLimitedByDate( this_pv_id, limitDate )
1604
   Dim queryResult
1611
   Dim queryResult
Line 1682... Line 1689...
1682
 
1689
 
1683
   If( (NOT IsNull(last_pv_id)) AND (last_pv_id <> pv_id) ) Then
1690
   If( (NOT IsNull(last_pv_id)) AND (last_pv_id <> pv_id) ) Then
1684
 
1691
 
1685
      ' Get the pv_id for the current version, and if necessary, work back through any ripple versions as necessary
1692
      ' Get the pv_id for the current version, and if necessary, work back through any ripple versions as necessary
1686
      ' to get a non-ripple version ancestor
1693
      ' to get a non-ripple version ancestor
1687
        pv_id = getLastNonRippleVersionPVID( pv_id )
1694
        pv_id = getLastNonRippleVersionPVID( pv_id , NULL, NULL)
1688
        If (pv_id <> "") Then
1695
        If (pv_id <> "") Then
1689
            getLastSignificantPVID = pv_id
1696
            getLastSignificantPVID = pv_id
1690
        End If
1697
        End If
1691
   End If
1698
   End If
1692
 
1699
 
1693
End Function
1700
End Function
-
 
1701
 
-
 
1702
'---------------------------------------------------------------
-
 
1703
' Function: getLastSignificantVersions
-
 
1704
'
-
 
1705
' Purpose: Returns the last significant (man-made) version (PV_ID) that
-
 
1706
'          is a predecessor to the specified pv_id
-
 
1707
'
-
 
1708
' Arguments: pv_id              : Uniquely identifies this package version
-
 
1709
'            RefRippleBase      : Ref to store riple base PVID
-
 
1710
'            RefPrevNonRipple   : Ref to store previous non ripple PVID
-
 
1711
' Notes:
-
 
1712
'
-
 
1713
Sub getLastSignificantVersions (pv_id, ByRef RefRippleBase, ByRef RefPrevNonRipple)
-
 
1714
    Dim rv
-
 
1715
        rv = getLastNonRippleVersionPVID( pv_id , RefRippleBase, RefPrevNonRipple)
-
 
1716
End Sub
-
 
1717
 
1694
'---------------------------------------------------------------
1718
'---------------------------------------------------------------
1695
' Function: get_Pkg_Label
1719
' Function: get_Pkg_Label
1696
'
1720
'
1697
' Purpose: Returns the package label for the specified pv_id
1721
' Purpose: Returns the package label for the specified pv_id
1698
'
1722
'