Subversion Recommendation

PhilipW

Member
Join Date
Dec 2002
Location
Wellington, New Zealand. Islands on the edge of th
Posts
923
Gents,

About 8 months ago I joined a small automation team (up until then I had worked on most projects on my own) and I had to face up for the first time the old problem of how to keep multiple files being worked on by several different people at different locations from getting lost, overwritten or conflicted.

After a some research I settled on Subversion.

The client we use is TortoiseSVN.

Both of these are Open Source projects.

It has taken a few hours of getting my head around them, as some of the jargon was unfamiliar, but we have been using it seriously now for about 3 months and we are pretty happy with it.

The main benefit is that it protects you from yourself, ie you cannot overwrite a new file with an old one, or another user cannot overwrite your latest version with his new version. Subversion also encourages the use of a log file and allows the user to revert to any previously committed version very easily.

There are three main options to setting up a Subversion server:

1. The Repository is served as an extension to an Apache web server. This works well if you want to run a public access server and you are already competent at managing webservers.

2. For automation people it is more likely you will choose the stand-alone "svnserve" service. This is typically run on an in-house server that everyone can access, and on which the Repository is routinely backed up to tape. This mode is ideal for us as we have our own isolated control systems network that only the control's guys use.

3. Or finally you can run just TortoiseSVN to create a Repository locally on your own local hard disk (not a mapped network disk) that only you can access. This mode is actually a good way to learn Subversion and is perfectly useful in its own right.

Another major plus for Subversion is that it treats ALL files by default as binary, whereas some of the other tools about (most commonly CVS) have to choose whether they will deal with the file as text or binary. For almost almost all automation applications the binary choice is the correct one, so Subversion is ideal in this respect.

Finally I have to say that it feels really cool in daily use, and it has notched up the degree of "professionalism" that we have brought to that essential, but often botched, task of file management and backup.
 
Last edited:
Are you using this for plc code - if so what plc's ? Can you easily view the differences between different versions of plc blocks ?
 
Subversion doesn't care what the file is...text, zips, docs, HMI graphics, or any PLC code....it treats them all the same. This is one of the reasons I selected it.

As it happens we are mostly using RSLogix 500/5000 *.RSS, *.ACD, and Citect *.CTZ files. But we are also happily storing Word Docs, pdf's, a bunch of Bailey Infni90 files and a Seimens S7 project. So far they have all worked just fine.

No it is not a substitute for a File Compare tool. Subversion can perform what is called a "blame" function, ie find out who edited what line of code at which version, and can go further to "merge" two conflicting files....BUT it can only do this on text files. In the automation world most of the files we use are in binary format, ie you cannot meaningfully merge two different edits to the same graphic.

Merging is possible on a text file if two different people have edited the same file, but on different lines. In this case Subversion will apply both sets of differences (the whole thing works using a powerful delta algorithm) and create a new version that contains the sum of all the changes BOTH programmers made. Having said that Subversion is not magic; the someone still needs to check the resulting file to ensure it makes logical and consistent sense.

Normally you could only do these things with text files; HOWEVER having said that I've just realised that if I saved my RSLogix5000 files in a text format, eg *.L5K, then it is quite likely that Subversion would be able to peform these functions. That would be even more cool. Must try it out.
 
Last edited:
About 8 months ago I joined a small automation team (up until then I had worked on most projects on my own)

Very hard to become accustomed to that. Only ever did it once and spent more time sending each other Excel files with I/O, commenst etc than doing real work. I was doing the PLC work and 2 others were doing the SCADA.

How did you find the sharing of info? Probably uncomfortable for a while.

The program sounds very interesting to me. Is it expensive?
 
Bob,

Being an Open Source project Subversion oeprates under what is generally termed a Apache/BSD-style licence. Terms. In practical terms this means it is free to use, you're just not permitted to re-package and sell it.

As for the mad swapping of Excell files thing, yes I've been there and done that, and I agree it doesn't feel good. But looking back I would point the finger at other un-resolved "non-technical" issues in that were rife in that environment. I've often thought that the technology is easy; it is the people that can be impossible. Having said that the team I've landed in right now is working together really well, probably BECAUSE we are all quite different people bringing complementary skills to the job.

The nice thing about Subversion is that it is just as useful for a one man operation like yours Bob. Certainly if I had found it earlier I would have adopted it just for my own purposes. It is just as useful to protect individuals against theiir own mistakes. For instance how often have you opened an "old" file with the intent to rename it and save it as a "new" version under a different name, done a whole lot of changes, and then inadvertently clicked "Save", instead of "Save As", thus overwriting the "old" version? Subversion ensures you can never loose ANY version of the file that you have "committed" to the repository. This kind of thing is just as useful for one person, as it is for a dozen.

But the nice thing about a versioning tool like Subversion, is that it does make collaborative work just that much easier. If nothing else it takes away that little edge of paranoia that one day you will do a delete on a networked drive, or overwrite someone else's files before the weekly backup is made. An awful lot of work can be quite easily lost like this. Plus once you start to use it you'll find a bunch of other features I haven't touched on.

The downloads are not big and its a very simple thing to install them and try them out. I should say that my first attempts at "self-teaching" by bumbling about clicking things were quite frustrating. This kind of versioning tool has its natural home in the C++ geekzone, so there were some things I got quite wrong at first. After reading the manual a few times, reading the user forums and digging my way through the dead-ends I was in, suddenly the light dawned. The issues were definitely my all mine, not the software. Now I have the whole team using it properly, none of us would look back...it's that good.
 
Last edited:

Similar Topics

A previous thread touched on something that I'm a little curious about. In my prior job, we used Git for version control (with SourceTree as the...
Replies
14
Views
12,966
I have worked on small projects using AB Micrologix but now we want to take a photo, process it online, and sort based on returned variables...
Replies
5
Views
315
Just looking for recommendation on what others are using for switches. I'm working on a parts list for a project. I need 40 ports...
Replies
12
Views
1,493
We have a 5 Ton Rheem A/C unit at home We only run it in the Summertime, and sometimes in the Fall. It does have a habit of blowing fuses at...
Replies
18
Views
2,478
Hello, Does anyone have a recommendation for a Modbus TCP remote IO. It pains me to have to use one. but yeah. Just standard remote IO with like...
Replies
12
Views
1,254
Back
Top Bottom