I previously blogged about some scripts I use to help Cadence & Subversion be more compatible. I received some feedback that the scripts were incomplete and came without any usage model. So, I went through an excercise to document the scripts and to make sure they were complete.
Untar the CDSVN.tar file. It will create a directory called CDSVN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
[wagh@porthos ~/example]$ tar xvf ~/cdsvn2.tar CDSVN/ CDSVN/cdsLibMgr.il CDSVN/bin/ CDSVN/bin/add CDSVN/bin/unlock CDSVN/bin/savesvn CDSVN/bin/fixtilde CDSVN/bin/unlockify CDSVN/bin/lock CDSVN/bin/lockify CDSVN/bin/cdsignore CDSVN/svnAddCV.il CDSVN/svnAddCell.il CDSVN/svnCopyCV.il CDSVN/svnCopyCell.il CDSVN/svnCopyTrigger.il CDSVN/svnLockCV.il CDSVN/svnLockCell.il CDSVN/menus/ CDSVN/menus/schematic.menus CDSVN/menus/layEdit.menus CDSVN/README CDSVN/COPYING CDSVN/svn.cdsinit CDSVN/cadence_ignores.txt CDSVN/example.cdsinit |
Set up Subversion with a new repository for Cadence
1 |
[wagh@porthos CDSVN]$ svnadmin create ~/examplerepo |
Modify svn.env script to point to your subversion repository
Change the line:
1 |
setenv SR file:///home/user/examplerepo |
to list your ~/examplerepo
(for example)
Set up environment variables
1 2 3 4 5 6 7 8 |
cd CDSVN [wagh@porthos CDSVN]$ source svn.env What this script just did: PATH = /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/wagh/example/CDSVN/bin If you haven't already, please edit this script to change the variable SR to point to a subversion repository SR = file:///home/user/examplerepo [wagh@porthos CDSVN]$ cd .. [wagh@porthos ~/example]$ |
Import your work area (CDSVN) into the repos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
[wagh@porthos CDSVN]$ svn import CDSVN $SR/trunk -m "Importing Cadence area into trunk" Adding CDSVN/svnLockCell.il Adding CDSVN/svnAddCell.il Adding CDSVN/cadence_ignores.txt Adding CDSVN/example.cdsinit Adding CDSVN/menus Adding CDSVN/menus/layEdit.menus Adding CDSVN/menus/schematic.menus Adding CDSVN/svnCopyTrigger.il Adding CDSVN/svn.env Adding CDSVN/README Adding CDSVN/svnCopyCV.il Adding CDSVN/svn.cdsinit Adding CDSVN/svnCopyCell.il Adding CDSVN/COPYING Adding CDSVN/bin Adding CDSVN/bin/lockify Adding CDSVN/bin/unlockify Adding CDSVN/bin/savesvn Adding CDSVN/bin/add Adding CDSVN/bin/fixtilde Adding CDSVN/bin/lock Adding CDSVN/bin/unlock Adding CDSVN/bin/cdsignore Adding CDSVN/cdsLibMgr.il Adding CDSVN/svnLockCV.il Adding CDSVN/svnAddCV.il Committed revision 1. |
Backup your CDSVN area and dump out a fresh copy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
[wagh@porthos ~/example]$ mv CDSVN CDSVN.bak [wagh@porthos ~/example]$ svn co $SR/trunk CDSVN A CDSVN/svnLockCell.il A CDSVN/svnAddCell.il A CDSVN/cadence_ignores.txt A CDSVN/menus A CDSVN/menus/layEdit.menus A CDSVN/menus/schematic.menus A CDSVN/example.cdsinit A CDSVN/svnCopyTrigger.il A CDSVN/svnCopyCV.il A CDSVN/svn.env A CDSVN/README A CDSVN/svn.cdsinit A CDSVN/svnCopyCell.il A CDSVN/bin A CDSVN/bin/lockify A CDSVN/bin/unlockify A CDSVN/bin/savesvn A CDSVN/bin/add A CDSVN/bin/fixtilde A CDSVN/bin/lock A CDSVN/bin/unlock A CDSVN/bin/cdsignore A CDSVN/COPYING A CDSVN/cdsLibMgr.il A CDSVN/svnLockCV.il A CDSVN/svnAddCV.il Checked out revision 1. |
cd CDSVN
and created/edit a .cdsinit
to include the line load("svn.cdsinit")
1 2 3 4 |
[wagh@porthos ~/example]$ cd CDSVN/ [wagh@porthos CDSVN]$ svn mv example.cdsinit .cdsinit A .cdsinit D example.cdsinit |
Start cadence & create a new library
1 |
[wagh@porthos CDSVN]$ icfb & |
Select no tech library (unless you explicitly have one defined already)
Add the new library to subversion management
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
[wagh@porthos CDSVN]$ svn st ? shared_design ? cds.lib D example.cdsinit A + .cdsinit [wagh@porthos CDSVN]$ add shared_design/ svn add -N shared_design/ A shared_design property 'svn:ignore' set on 'shared_design' A shared_design/cdsinfo.tag A (bin) shared_design/prop.xx [wagh@porthos CDSVN]$ svn st ? cds.lib D example.cdsinit A shared_design A shared_design/cdsinfo.tag A shared_design/prop.xx A + .cdsinit [wagh@porthos CDSVN]$ svn add cds.lib A cds.lib [wagh@porthos CDSVN]$ svn ci -m "Got barebones libraries set up" Adding .cdsinit Adding cds.lib Deleting example.cdsinit Adding shared_design Adding shared_design/cdsinfo.tag Adding (bin) shared_design/prop.xx Transmitting file data ... Committed revision 2. |
Start library manger & create a new cell
(Optional) Edit the cell view
Back in library manager, add the cell view to subversion
Do a status on the command-line
1 2 3 4 5 6 7 8 9 |
[wagh@porthos CDSVN]$ svn st ? libManager.log.1 ? libManager.log.1.cdslck A shared_design/top_level A shared_design/top_level/schematic A shared_design/top_level/schematic/sch.cdb A shared_design/top_level/schematic/master.tag A shared_design/top_level/schematic/pc.db A shared_design/top_level/schematic/prop.xx |
Check in
1 2 3 4 5 6 7 8 9 |
[wagh@porthos CDSVN]$ svn ci -m "Adding shared_design" Adding shared_design/top_level Adding shared_design/top_level/schematic Adding shared_design/top_level/schematic/master.tag Adding shared_design/top_level/schematic/pc.db Adding (bin) shared_design/top_level/schematic/prop.xx Adding (bin) shared_design/top_level/schematic/sch.cdb Transmitting file data .... Committed revision 3. |
Edit the cell some more
Try to check & save
Lock the cell view
Check & save again
Do another svn status
1 2 3 4 5 6 7 |
[wagh@porthos CDSVN]$ svn st ? libManager.log.1 ? libManager.log.1.cdslck M K shared_design/top_level/schematic/sch.cdb K shared_design/top_level/schematic/master.tag M K shared_design/top_level/schematic/pc.db M K shared_design/top_level/schematic/prop.xx |
We can see that the schematic has been modified
Check in again
1 2 3 4 5 6 |
[wagh@porthos CDSVN]$ svn ci -m "Added another resistor" Sending shared_design/top_level/schematic/pc.db Sending shared_design/top_level/schematic/prop.xx Sending shared_design/top_level/schematic/sch.cdb Transmitting file data ... Committed revision 4. |
[…] is purely personal taste; others will (strongly) disagree. In fact, for many other purposes, I strongly prefer Subversion to […]
Hi Poojan,
thanks a lot for the update and for the nice tutorial 🙂 Everything is working now.
Regards,
Markus