Main Board > Tips and Techniques

How does SVN work?


Generally how our SVN interface works is that each programmer works from their own desktop, each of which contains a copy of the SVN library generally refereed to as their sandbox.  The programs and Nomads panels in the sandbox are maintained in text form.

When they edit a program and issue a SAVE command (from command line or via any of the editors), the system not only updates the application code (compiled version of the program) but also the text version of the program in the sandbox.  Same holds true for PxPlus Nomads panels the system updates not only the screen library but also the text mode sandbox where each panel is maintained as a separate text file in a sub-directory whose name matches that of the screen library.

When the programmer is happy that his/her changes are clean and they want to commit these they use TortoiseSVN to commit the changes source files from their sandbox to the SVN server/repository.  This is done using a secure SSH connection using Putty.

On a regular basis programmers should 'Update' their sandbox from the SVN server.  This update process will update the files in their sandbox with the current committed versions.  Should the program be working on the same programs and as such their sandbox version have changes they have made, the system will attempt to merge the SVN repository version with their changes.

Should the system find that the there is a conflict between changes the program has made and the repository version, it will flag the file and request that the user either manually merge the changes or accept the SVN repository version or their own.  This rarely happens as a conflict would only occur if the program changed the same line.

The biggest advantage that using SVN provides is that each programmer can work independently and generally not have to worry about 'locking' programs or panels.  Also since each programmer has their own copy of the software they can work remotely without the need to be only constantly.  They only need to connect to the server when committing changes or updating the workstation.

Further details on how to setup:

Stéphane Devouard:
A quick question for the Subversion users out there : are you all hosting your SVN server and repos in-house or are some of you using 3rd-party specialized hosting ? In the 2nd case, any recommendation ?

Mike King:

For us we host the SVN server in-house -- actually quite literally in-house as the server resides off site at our home thus serving not only as the repository but off site backup for all the source.

We back the repository up nightly to both a server in our office and to one of our web site servers which is at a hosting provider (and get daily emails confirming backup was successful -- so at least someone sends me mail on a daily basis ;) )

This setup has worked well for the past 15 years (that is when PVX Plus was founded) and, apart from the odd time when the internet was down, it has provided us easy and secure access to the SVN repository for all our staff. 

Setting up the SVN server on a Linux system was pretty easy to do and took about a hour what with installing and configure the software.  We firewalled the router and network plus provided access keys (SSH encryption certificates) for each of the developers.

We opted to have a private server as it is less a target than a centralized hosting service provider or things like GITHUB might be.  If someone wants to hack into a server they are more likely to target larger sites as the reward would be greater.

As I said, this has worked well for 15 years so my personal recommendation would be to do it in-house as opposed to trying to deal with 3rd parties for setup, backup and ongoing control of user access.

Stéphane Devouard:

Thanks for your feedback

I was not aware you were in dear need of daily emails, but as I am re-doing some PxPlus coding and consulting as a freelance now, I can probably help  ;)

I have been doing a POC for a client and yes, setting up the SVN repo with Tortoise on my laptop then doing the PxPlus app and src directories setup and the initial commit took a couple of hours. That's great but of course a source code repo is more useful if shared and used by several developers  :)

Github is for open-source and is a collaborating website and some king of social media for developers (you need to have a Github account with some projects on it and link it in your résumé these days, at least when searching for a job in the more mainstream languages and frameworks). The code you put there is free, and supposed to be either cloned and changed with pull requests to integrate contributions in your source, or forked to create alternate versions. I don't think that's the kind of site a hacker would target... but who knows what's in their sh*thead ?
By the way, any plan to extend the SVN interface to git as it is becoming an industry standard ?

I found services like or and was wondering if it was worth a try.
If anyone else has any insight and want to chime in, that would be great

Mike King:
As I said our repository is shared by all our developers and they access it via the internet from anywhere (I've made numerous accesses from cruise ships and on the beach or at the pool on Caribbean islands).

We use putty with ssh certificates to assure who has access to the repository and provide the contributors individual log on userids with certificates for the Linux server. 

The server is on a dynamic IP address on a home cable modem and we use to provide the dns name services for the server.

I suspect you could use something as small as a raspberry pi to host the repository if you wanted but certainly any old Windows box could be setup with Linux to run as a server.


[0] Message Index

Go to full version