2014-03-07 - SubVersion
SVN ( SubVersioN) is a version control system. The main part of SVN is the repository which is a collection of versioned files and directories. You setup an SVN server by creating a repository and adding files to it. You then check out a working copy of those files and make changes to them. As you make changes you periodically commit them back to the server. The repository stores files as a collection of changes which allows you to view not only the latest version but any version of the files. The more check-ins you make the more history your files have. As you are working on something you can undo certain changes. You can see when a change was made and possibly why it was made if a message was added with the commit. If you change how something works but later decide you’d like to have some of that functionality back you can grab a copy of the file before those changes. This is one of the reasons I recently setup an SVN server locally and added this website and a bunch of my programming projects to it.
One of the other reasons I setup the SVN server was to make it easier to keep copies of the same file in sync. SVN allows you to set an “Externals” property on a folder which tells it that it should copy files or folders from another part of the repository into that folder. If you commit changes to the original those changes will get propagated to the copy when you update and the same thing happens if you change the copy. This is very helpful to me as I want to have copies of files from other projects as part of the website. Similarly as I’m working on the command line version of the code viewer I can setup an “Externals” property on the project folder to copy the types folder from the website. This means that the website code viewer and the command line code viewer are always working from the same files.
It’s also very helpful for organization and backup. All my projects are in their own folders in the repository and they are setup to have similar folder structures. I can also have several working copies of the projects so that there are backups of all my files without the need for manually syncing them.
Comments: