;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; File: CDS_P4SetProps.il
; Description: Custom code to setup acls for libraries
; edit this for your site configuration
; Author: Shiv Sikand <sikand@users.sourceforge.net>
; Created: Jul 17 16:10 00
; Modified: Jul 17 16:11 00 362 sikand
; Language: Skill
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) 2000, Perforce Software, All rights reserved.
;
; This software was originally developed by Silicon Graphics, Inc (SGI).
;
; Redistribution and use in source and binary forms, with or
; without modification, are permitted provided that the following
; conditions are met:
;
; Redistributions of source code must retain the above copyright notice,
; this list of conditions and the following disclaimer.
;
; Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
;
; Neither name of Perforce Software nor SGI nor the names of its
; contributors may be used to endorse or promote products derived from
; this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
procedure(CDS_P4SetProps() ;_Mar 28 00 sikand 682
let(( type bagId group bagged wacl)
foreach( lib ddGetLibList()
when( ddGetObjDMSys(lib) == "p4"
bagId = dbOpenBag(lib "a")
printf("Checking %s\n", lib~>name)
if( rexMatchp("reference" lib~>writePath) then
bagId~>p4type= "Reference"
if( rexMatchp("clk" lib~>name) then
bagId~>p4acl= "reflibsclock"
wacl = t
)
if( rexMatchp("power" lib~>name) then
bagId~>p4acl= "reflibspower"
wacl = t
)
unless( wacl
bagId~>p4acl="reflibs"
)
) ; ** if rexMatchp **
if( rexMatchp("block" lib~>writePath) then
bagId~>p4type= "Design"
bagId~>p4acl = nil
)
wacl = nil
dbSaveBag(bagId)
dbCloseBag(bagId)
printf("Lib %s, Type %s, Acl %s\n",
lib~>name, lib~>p4type, lib~>p4acl)
) ; ** when ddGetObjDMSys **
) ; ** foreach lib **
) ; ** let **
) ; ** procedure CDS_P4SetProps **
procedure(CDS_P4CheckinProps() ;_Mar 29 00 sikand 150
let(( bagId dd)
foreach( lib ddGetLibList()
printf("Checking %s\n",lib~>name)
bagId = dbOpenBag(lib "r")
;; get the ddid
dd = dbGetBagDdId(bagId)
when( !ddNeedCheckout(dd)
ddCheckin(dd "added type and acls")
)
) ; ** foreach lib **
) ; ** let **
) ; ** procedure CDS_P4CheckinProps **