Problem with Copying cells

Discussion in 'Cadence' started by Guenther Sohler, Jul 20, 2007.

  1. Dear Group,

    We started putting our cadence database under revision control.
    Thus there sit lots of .svn directories within the library subtree.
    Now, when I want to copy a cell with library manager to another one.
    Its .svn directory is also copied, which is NOT inteded. It definetly
    will confuse SVN and SVN consistency.
    New files appearing in the filesystem(like the COPY of a cell) shall
    effectively NOT be under revision control

    My intent is telling cadence just to copy the KNOWN files, not all files

    I found some link into this topic modifying the data.reg file but
    I have just found a way of LINKING relations, not FORBIDDING relations.

    Can anybody guide me to the correct way ?

    rds
     
    Guenther Sohler, Jul 20, 2007
    #1
  2. Guenther Sohler

    Poojan Wagh Guest

    I had the same problem using subversion. I basically ended up only
    copying only the files listed as being members of the cell using the
    "svn cp" command. This is what you really want, as it tells subversion
    of the ancestry of each cell/file. I will e-mail you my skill script
    that does this directly.

    My company was lucky enough to have previewed ICManage's offering.
    Their implementation of version control under Cadence seemed like a
    good choice. Unfortunately, we didn't have a budget allocated for
    version control. Consider contacting them, since they have solved many
    of these problems already.
     
    Poojan Wagh, Jul 20, 2007
    #2
  3. Guenther Sohler

    Fergus_S Guest

    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 ***
     
    Fergus_S, Jul 21, 2007
    #3
  4. Guenther Sohler

    Poojan Wagh Guest

    Correction to my previous post: I had meant to recommend VersIC, not
    IC Manage. VersIC was the tool that we were able to preview at my
    company, that had subversion integration already done. I was very
    impressed with their offering.
     
    Poojan Wagh, Jul 21, 2007
    #4
  5. Hallo,

    I tried the 2nd approach, with ccpRegTrigger(
    "ccpPostTransferTrigger" 'myCcpPostTransferTrigger )

    defining the function, registering the callback.
    But when I copy a cell in library manager, I expect that this
    callback is triggered afterwards but it seems that it does not get called
    because

    * The .svn directory is still there in the copy
    * i dont see the debug println
    * i dont see the file created with system("touch /tmp/hallo")


    What could be wrong ?
     
    Guenther Sohler, Jul 23, 2007
    #5
  6. Hallo Poojan,

    Thank you for your post and the background information. I see the general
    algorithm by just backing up the cadence copy with "svn cp"
    I cannot understand why it is an special advantage for cdb data, when
    subversion additionally remebers the cells ancester.
    Do you think its possible to really REPLACE the original copy item in
    library manager ?
     
    Guenther Sohler, Jul 23, 2007
    #6
  7. Guenther Sohler

    Fergus_S Guest

    Perhaps you need to set the variable to make the cdsCopy happen in
    DFII - if you don't do this, the triggers are never run:

    envSetVal("ddserv.lib" "enableCopyInDFII" 'boolean t)

    fergus
     
    Fergus_S, Jul 24, 2007
    #7
  8. Guenther Sohler

    Fergus_S Guest

    Thanks to Amir at Cadence for showing me that retHint needs to be
    modified in place to be visible to the calling function.
    So the working code is:

    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 )
    setcar(retHint 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

    ccpRegTrigger( "ccpPostExpandTrigger" 'myCcpPostExpandTrigger t )
     
    Fergus_S, Jul 24, 2007
    #8
  9. Guenther Sohler

    Poojan Wagh Guest

    Either copying with ancestry (using subversion) or a simple replace
    (outside of subversion) are possible. Which one you choose to do
    simply depends on the purpose of your operation and what methodology
    you wish to follow (i.e. how much you want to use subversion's
    facilities).

    I was operating on the assumption that if you use subversion, you do
    want to keep track of ancestry. Note that subversion can merge single
    changes to binary files. It just cannot merge multiple changes to
    binary files. Let's suppose:
    1. You have an LNA for part1
    2. You copy it (with ancestry) to part2
    3. You improve on it in part2
    4. You want the same changes applied to part1
    Subversion can do that provided the LNA in part1 has not changed in-
    between step 2 & 4.

    Of course, you are always able to do a simple copy (using Cadence but
    overloaded so that .svn directories don't come along). This action is
    definitely more direct from a user perspective, and I believe is the
    problem that you were initially trying to tackle.

    However, if you use subversion to merge the changes (using a tool like
    svnmerge), the repository also keeps track of which changes went where.
     
    Poojan Wagh, Jul 24, 2007
    #9
  10. Thank you now it works,

    but you have to change it to

    rds
     
    Guenther Sohler, Aug 8, 2007
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.