Author Topic: Version control (SVN & Vaults)  (Read 16365 times)

0 Members and 1 Guest are viewing this topic.

Offline logictomTopic starter

  • Supporter
  • ****
  • Posts: 336
  • Country: au
Version control (SVN & Vaults)
« on: October 25, 2012, 02:28:55 pm »
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?
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #1 on: October 25, 2012, 09:16:14 pm »
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 your SVN 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.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #2 on: October 30, 2012, 08:28:49 am »
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.


 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #3 on: October 30, 2012, 08:47:34 am »
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).
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #4 on: March 06, 2013, 06:10:00 pm »
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 ...
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.

What 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 :P) 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. XD

Anyways, any hints/tips for a Svn On Altium newby?
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #5 on: March 06, 2013, 09:31:40 pm »

Quote
What 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 :P) 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.

I 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.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #6 on: March 06, 2013, 09:35:13 pm »
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.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #7 on: March 07, 2013, 01:53:58 pm »
I 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.

Ah 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.

Quote
ps. I watched an old TV show and found out who you are Mr Flibble, .. I'm scared.

Beware of hand puppets with hex vision. >:D

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.

Yes, 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.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #8 on: March 07, 2013, 03:05:16 pm »
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_Manager

I 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?
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #9 on: March 07, 2013, 10:06:01 pm »
Quote
Plus what I like is that you can select 2 revisions of a PCB and then view diffs side by side.

Is there anyway you can diff different version of the same layer over each other? That would be handy.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #10 on: March 07, 2013, 10:40:57 pm »
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 map

But ... that would lose the ability of being able to pointey-clickey on a diff of interest and then selecting a component or whatever.


 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #11 on: March 07, 2013, 11:37:18 pm »
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.

 
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #12 on: March 08, 2013, 04:06:18 pm »
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.

The 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.


Quote
Do Altium, or more importantly for me do it Kicad.

Well, 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. :P

I recently tried to generate a component in schematic library from a .csv file and couldn't get that to work. :( No doubt I made some silly mistake somewhere. Even using the provided example pindata.csv throws an error. Now that is something I'll put some time into, because no way am I going to enter new parts entirely by hand. :P
« Last Edit: March 08, 2013, 04:08:01 pm by mrflibble »
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #13 on: March 08, 2013, 11:35:12 pm »
Quote
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."
That 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.
Quote
Even using the provided example pindata.csv throws an error.
That's a shame, I guess It's not showing any sensible error message.




 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #14 on: March 09, 2013, 12:43:10 pm »
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.

That 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's an option that I did not test.

Quote
Quote
Even using the provided example pindata.csv throws an error.
That's a shame, I guess It's not showing any sensible error message.

Well, 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. :P 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
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #15 on: March 09, 2013, 01:20:58 pm »
Yay! I found this thread about 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: [Select]
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;
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Version control (SVN & Vaults)
« Reply #16 on: March 09, 2013, 01:32:26 pm »
Thats good, out of the way, there's only some much time you want to dedicate to bugs like that one.

 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Version control (SVN & Vaults)
« Reply #17 on: March 09, 2013, 02:01:19 pm »
Indeed. The current objective is to make a few PCBs, not becoming a DelphiScriptWizard [tm].

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*
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf