{"id":125,"date":"1999-11-29T19:00:00","date_gmt":"1999-11-30T00:00:00","guid":{"rendered":"http:\/\/www.circuitdesign.info\/?p=125"},"modified":"2008-11-20T00:25:52","modified_gmt":"2008-11-20T05:25:52","slug":"getting-subversion-and-cadence-to-play-nice","status":"publish","type":"post","link":"https:\/\/www.circuitdesign.info\/blog\/1999\/11\/getting-subversion-and-cadence-to-play-nice\/","title":{"rendered":"Getting subversion and Cadence to play nice"},"content":{"rendered":"<p>I wrote a set of scripts to make Cadence IC tools &amp; Subversion work together.<\/p>\n<p>Note: this is not actual <a title=\"delivers Subversion design-management integration for Cadence\" href=\"http:\/\/www.versic.com\" target=\"_blank\">Cadence\/Subversion integration<\/a> (which is much more powerful and highly recommended). There were a few problems that I had to solve:<\/p>\n<h2>Pesky .svn directories<\/h2>\n<p>The main problem is that Subversion puts .svn housekeeping directories everywhere. When I&#8217;d copy a cell, these directories would come along. This baggage caused subversion to get really confused. It would think that the new cell was a check-out of the old cell (not a copy with ancestry). It was clear that something needed to be done to prevent these copies. So, I created a copy hook to remove .svn directories from cadence copy commands; this is contained in <code>svnCopyTrigger.il<\/code>.<\/p>\n<p>This solution isn&#8217;t complete&#8211;namely, when the analog design<br \/>\nenvironment (ADE) saves a simulation state, it seems to completely<br \/>\nobliterate the directory (including the .svn sub-directory) and re-save<br \/>\nthe state information. What I&#8217;ve found that works is:<\/p>\n<ol>\n<li>remove the pre-existing ADE state directory (either in .\/.artist_state or as cell-view)<\/li>\n<li>re-save the new state using ADE<\/li>\n<li>tar up the saved state<\/li>\n<li>svn up to restore the .svn directory<\/li>\n<li>untar the saved state (over-writing the state information but not the .svn directory)<\/li>\n<\/ol>\n<p>I have automated steps 3,4,5 in a script called <code>lockify<\/code>.<\/p>\n<h2>Locking<\/h2>\n<p>For a while, I went without locking. This worked well until someone else was working on the same design<span> (<\/span><span>as soon as it went to layout)<\/span>. So, it was clear that we needed a locking mechanism. This is where subversion (and not many other version control systems) shines: it has a very unobtrusive locking mechanism. By setting the correct properties, files will be dumped out with read-only UNIX permissions. By giving an <code>svn lock<\/code> command, subversion will mark the file &#8220;locked&#8221; in the repository (thus allowing no one else to lock it) and make it writable in your working copy.<\/p>\n<p>The only difficulty with this system is that it works on files only. There is no recursive lock command. So, I wrote a python script to recurse down directories and lock all files. I also wrote a script (lockify) to recursively put permissions (svn:lock-required) on all files in a directory so that subversion &#8220;requires&#8221; them to be locked before editing.<\/p>\n<p>Note that locks can be bypassed by chmod&#8217;ing a directory. This is useful since you may want to try an edit that you don&#8217;t intend to check back in while someone else has it locked. The locking mechanism gives users a default way to avoid stepping on each others toes without paralyzing them.<\/p>\n<p>Eventually, I found myself locking from the command-line so often, that I created Cadence procedures to do it (svnLockCell.il and svnLockCellView.il) and associated schematic\/layout\/symbol menu picks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote a set of scripts to make Cadence IC tools &amp; Subversion work together. Note: this is not actual Cadence\/Subversion integration (which is much more powerful and highly recommended). There were a few problems that I had to solve: Pesky .svn directories The main problem is that Subversion puts .svn housekeeping directories everywhere. When [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[33,81,57,182,32,36],"class_list":["post-125","post","type-post","status-publish","format-standard","hentry","category-analog-pro","tag-cadence","tag-design-management","tag-skill","tag-software","tag-subversion","tag-version-control"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/poCEy-21","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":9,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":421,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/posts\/125\/revisions\/421"}],"wp:attachment":[{"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuitdesign.info\/blog\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}