According to the cdsCopy documentation it should be possible to
exclude the
..svn directories from the copy operation by registering a trigger
function to
remove them from the copy list, something like this:
/*********************************************************************
* myCcpPostExpandTrigger
*
* cdsCopy trigger function to prevent copy of .svn directories
* Modifies the value of checkOffList in place.
********************************************************************/
procedure( myCcpPostExpandTrigger(myFunction copyPhaseStr
checkOffList
supplementList otherFromSpecs otherToSpecs updateList
retHint ctxList reserved )
let(( fromSpec )
;;---------------------------------------------------------------------
;; Exclude all dot dirs and files from copy
;;---------------------------------------------------------------------
foreach( copyObj checkOffList
when( fromSpec = cadr(copyObj)
fromSpec = gdmInspectSpec(fromSpec)
when( rexMatchp("^\\." car(last(fromSpec)))
;;---------------------------------------------------------
;; Mark this item for ignore by cdsCopy, set
retHint
;;---------------------------------------------------------
setcar( copyObj nil )
retHint = list(t)
fromSpec = buildString(setof(x fromSpec
stringp(x)) "/")
printf("Will not copy %L\n" fromSpec)
); when rexMatchp
); when fromSpec
); foreach copyObj
t
); let
); procedure myCcpPostExpandTrigger
Which is registered with the 'canEdit' flag set, per the documentation
ccpRegTrigger( "ccpPostExpandTrigger" 'myCcpPostExpandTrigger t )
The trigger function is called because I do see the 'Will not copy'
messages,
but the .svn directories are copied anyway, so it's not working as
expected.
It's not even clear how it's supposed to work, since any change to
variables
inside the trigger function would not normally be visible outside the
scope of
the function, right?
You *can* remove the .svn directories from the copied library by
defining and
registering a different cdsCopy trigger, which is an acceptable
solution if you
are not copying data into another Subversion-managed library.
/
******************************************************************************
* myCcpPostTransferTrigger
* Description: cdsCopy trigger to delete dot dirs in destination
library
* Only required because vscCcpPostExpandTrigger doesn't
work
*****************************************************************************/
procedure( myCcpPostTransferTrigger( _funcName _copyPhaseStr
_checkOffList
_supplementList
_otherFromSpecs otherToSpecs
_updateList _retHint _ctxList
_reserved )
let(( toSpec toGdm ddObj )
;;---------------------------------------------------------------------
;; Delete dot dirs and files from destination data
;;---------------------------------------------------------------------
while( toSpec = gdmNextFromSpecList( otherToSpecs )
toGdm = gdmInspectSpec(toSpec)
when( rexMatchp("^\\.svn" car(last(toGdm))) &&
(ddObj =
apply('ddGetObj toGdm))
vscSystem(strcat("rm -rf " ddObj~>readPath))
); when rexMatchp
); while toSpec
t
); let
); procedure myCcpPostTransferTrigger
ccpRegTrigger( "ccpPostTransferTrigger" 'myCcpPostTransferTrigger )
***
http://www.methodics-eda.com - VersIC DDM for Cadence ***