Version control (SVN & Vaults) - Page 1
Forum section: electronics / general

author: logictom
author_rank: Unknown
timestamp: October 25, 2012, 02:28:55 pm
content: Does anyone have any experience setting up or using version control with Altium?I haven't used either and I'm still a little confused about how to set it up. Do you use either SVN or Vaults or both?I have had a bit of a play with the vaults but only as far as putting some components in, I was stumped when trying to place components into a schematic from the vault library.What I ultimately want to be able to do is setup libraries for components and footprints that have been checked that anyone can pull down and use.Version control of designs with the ability to commit(?) versions when they are manufactured but with the ability to then create newer versions and keep the old version if we need to go back to it for what ever reason. This seems to be where the vault comes in with releasing designs.The question then is if I setup the vault correctly do I also need to use SVN and for what part of the system?

author: David_AVD
author_rank: Super Contributor
timestamp: October 25, 2012, 09:16:14 pm
content: I actually started using Altium's SVN functions only this week.We've been using Tortoise SVN for some time with the Linux server.Once you have yourSVN repository set up, it's quite easy to link to it in Altium.I'm only using it for projects and whole libraries so far.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: October 30, 2012, 08:28:49 am
content: I use SVN and the tortoise client at home and work, I use it for all my file versioning( except photos). I use SVN with all my Kicad libraries and projects and it is such a useful tool.I would steer clear of any application integration though, has Altium got integration with SVN? The trouble with applications integrating with source control is that if it becomes broken (out of synch somehow) sometimes it is very hard to fix and you may even loose work.

author: David_AVD
author_rank: Super Contributor
timestamp: October 30, 2012, 08:47:34 am
content: The Altium SVN integration is actually very good. All I had to do is point it to our (https) repository and that was it. It even has a button to test the connection.Updates and commits are just a right click operations. You can still use Tortoise and Altium will pick up any changes (and visa versa).

author: mrflibble
author_rank: Super Contributor
timestamp: March 06, 2013, 06:10:00 pm
content: Right, just started using SVN for Altium. That was surprisingly easy. Just added a repo for altium on my server, pointy clicky on the client and we have svn.Are there any gotcha's I should be aware of or clever hints ?also ...Quote from: HackedFridgeMagnet on October 30, 2012, 08:28:49 amWhat do you mean by "integration"? The app doing the commits for you instead of you having to do stuff manually from cmd line or tortoise or whatever? If yes, I should hope so! It's 2013, not 2005! (just migrated my oooold 2005 svn to new server, hence the semi-arbitrary number) In 2005 you still had to do some svn stuff by hand, but by now I really should hope an application like Altium can do it's own svn calls and have a decent frontend thank you very much.Or maybe you mean integration as in libsvn vs external svn binaries? I noticed altium supports both builtin and external svn.exe. I used the builtin and everything seems to work just fine. So far. XDAnyways, any hints/tips for a Svn On Altium newby?

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 06, 2013, 09:31:40 pm
content: QuoteI guess it is just a personal preference but why do you need to be in Altium to do the check in. What if you want source control for non Altium products? So you end up running tortoise anyway, so you are integrated with Windows Explorer too.I was talking about the external svn binaries.I think having 3 separate products being integrated might lead to problems was my thought.That said I haven't tried the Altium integration so you're right, I should stay out of it.ps. I watched an old TV show and found out who you are Mr Flibble, .. I'm scared.

author: David_AVD
author_rank: Super Contributor
timestamp: March 06, 2013, 09:35:13 pm
content: I use the inbuilt SVN for Altium projects because it works well and is only a couple of clicks away in the project tab. It also takes care of not adding all those files (history, etc) that you don't usually want to keep.I use Tortoise SVN for Microchip projects. I think I looked in MPLAB for SVN but it was either not there or not easy to use.

author: mrflibble
author_rank: Super Contributor
timestamp: March 07, 2013, 01:53:58 pm
content: Quote from: HackedFridgeMagnet on March 06, 2013, 09:31:40 pmAh okay. And you are right that it probably comes down to personal preferences. Nothing wrong with using tortoise if that's how you like to work. Personally I am a lazy bastard, and like to get things done with a minimum of effort. So if I can do SVN commits with a few keystrokes from the application I am working in then all the better.c, e, down, enter ... all the right files are selected automatically ... type comment for this commit ... press OK. And we're done.Plus what I like is that you can select 2 revisions of a PCB and then view diffs side by side.QuoteBeware of hand puppets with hex vision.Quote from: David_AVD on March 06, 2013, 09:35:13 pmYes, precisely this. Just 4 presses on keyboard and I can enter my commit log. And the automatic selection of just the right project files saves time as well.Next up is to try and use tags, so far I haven't been able to find that. Maybe I should *gasp* RTFM.

author: mrflibble
author_rank: Super Contributor
timestamp: March 07, 2013, 03:05:16 pm
content: Well darnit! Can't seem to find how to do tags or releases from within Altium. I can of course do the tag/release thing from cmd line, but I'd prefer to do it from within the app if possible.While googling around I did bump into this one (again):http://code.google.com/p/altium-designer-addons/wiki/Release_ManagerI get the idea that Altium would like to have you stuff the releases into the OMGWTFBBQVAULT, but if so, I fail to see the point. I have my trusty svn, so I'd rather put releases there...Maybe I am missing something here?

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 07, 2013, 10:06:01 pm
content: QuoteIs there anyway you can diff different version of the same layer over each other? That would be handy.

author: mrflibble
author_rank: Super Contributor
timestamp: March 07, 2013, 10:40:57 pm
content: That would indeed be handy. I didn't notice any such feature.I suppose if you really wanted to, you could do something like:- generate gerbers for both revisions for the layer of interest- use your favorite gerber tool to XOR the 2 gerbers- use the XOR result either as a highlight, or different color overlay, or alpha mapBut ... that would lose the ability of being able to pointey-clickey on a diff of interest and then selecting a component or whatever.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 07, 2013, 11:37:18 pm
content: I assume the altium design files are text like Kicad.You could almost do it in script,Compare the two design files and find the layers that are different between the two.make an new design file but write some new layers in, 2 for each layer which has a difference. One original and one the modified version, add a suffix to it's layer name.then present it as a normal design file.Obviously it wouldn't be a walk in the park, but if you had time it might be possible, and there would be some issues like surface layers and data that is not held in the layers themselves.Do Altium, or more importantly for me do it Kicad.

author: mrflibble
author_rank: Super Contributor
timestamp: March 08, 2013, 04:06:18 pm
content: Quote from: HackedFridgeMagnet on March 07, 2013, 11:37:18 pmThe file format hardly matters. Well sortof. Choose.Either you mean: "It is a text file, and as such I can easily parse it with my external (non-Altium) script. And after that I will cleverly deduce what the differences in the text file mean, etc etc."Or you mean: "It's a text file. Text files are nice. And the scripting shall be done by an Altium script."For me the only reasonable time investment would be to use altium scripting for a task like this. I have zero intention of writing a parser for whatever the file format is. That's Altium's job. And since the only reasonable (to me at least) approach is using Altium's internal scripting, it doesn't really matter what file format it uses.Look at it this way ... suppose I have a whatever it is stored in XML. Sure, I can diff 2 revisions of the xml. I could even dump a pretty tree showing the diffs, etc. But those pretty diffs are no use without domain specific knowledge. THAT is were the real work (read: time sink) is.QuoteWell, I am not going to do kicad. Hell, I am currently using altium and I am not even going to do altium.If only because I am an absolute n00b when it comes to altium scripting. I can't even get supposedly working scripts to work.I recently tried togenerate a component in schematic library from a .csv fileand couldn't get that to work.No doubt I made some silly mistake somewhere. Even using the provided example pindata.csv throws an error. Nowthatis something I'll put some time into, because no way am I going to enter new parts entirely by hand.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 08, 2013, 11:35:12 pm
content: QuoteThat was what I meant except that I wasn't suggesting that you or I actually do it .Yes I'm sure it would take a while to get right, all I was thinking was that it could be a nice feature for a pcb design tool. And the sort of thing that would be better integrated with source control. Although It could work as an SVN plugin too, I suppose.To clarify what the tool could do:A graphical diff tool where the 2 versions of the boards were overlaid as a pseudo board. The track differences are highlighted or generated as a diff layer and a common layer.You're right the file format hardly matters as long as you know what it is.QuoteThat's a shame, I guess It's not showing any sensible error message.

author: mrflibble
author_rank: Super Contributor
timestamp: March 09, 2013, 12:43:10 pm
content: Quote from: HackedFridgeMagnet on March 08, 2013, 11:35:12 pmThat would indeed be a handy feature.One method I can think of that should be doable is basically what I already described. Generate gerbers for 2 revisions. XOR the layers, so you get the diffs for each layer ... in new gerber files. Then import one or more diff gerbers as one or more new layers, for which I believe there'san option that I did not test.QuoteWell, the error does make some sense after looking at the code. It's just not sensible enough that I am able to remedy the situation.It's on the todo for after I finish routing the current pcb. For the next schematic I'd really like to be able to automate a large part of the "add new parts to the library" exercise.Incidentally, this is the error:Undeclared identifier: RegisterSchObjectInContainer

author: mrflibble
author_rank: Super Contributor
timestamp: March 09, 2013, 01:20:58 pm
content: Yay! I foundthis threadabout the same problem.I didn't do quite the same thing as he did. Actually much simpler. I just added this to the TImportPinsForm.ButtonImportClick procedure and now it works.Code:Begin// WORKAROUND: http://www.elektronik.si/phpBB2/viewtopic.php?p=46420// For some stupid reason SchDoc currently does not point to our current (SchLib) doc.SchDoc := SchServer.GetCurrentSchDocument;If SchDoc = Nil Then Exit;

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 09, 2013, 01:32:26 pm
content: Thats good, out of the way, there's only some much time you want to dedicate to bugs like that one.

author: mrflibble
author_rank: Super Contributor
timestamp: March 09, 2013, 02:01:19 pm
content: Indeed. The current objective is to make a few PCBs, not becoming a DelphiScriptWizard .Now I just have to make a little shell/perl/whateverisconvenient script to convert the pdf to .csv compatible with the import script and I'm all set.GAH! Now where is that geda script I used eons ago?!? *boot brain*