| Worry free development: An SVN tutorial for single developers |
| Sunday, 19 July 2009 21:50 |
|
Page 1 of 2 This guide will (hopefully) enlighten you to the benefits of using a Source Control system in your development, even if you are a hobbyist working on small projects. After a 5 minute free installation you will be able to save a snapshot of your project with a single click, allowing you to modify the code knowing you can revert your changes to any state at any time. Working as a single programmer on a project has its benefits - no one tramples your code, you can modify any module you wish at any time and as long as you keep your standards, the project will always compile. As the team grows bigger and the project becomes mission critical, many problems arise:
Source Control, in a nutshell Source Control systems were devised to help with the above and much much more. Commercial grade examples include cvs, svn, ClearCase, Perforce, SourceSafe and many others. They all share the same basic architecture: A single server contains a change-based repository of your projects while distributed clients (which reside on the programmers machine) allow the programmer to access code on the repository for either applying his changes to the repository (what is usually called "checking in" or "committing") or by synchronizing to the changes made to the project by others ("updating", "syncing to latest" and sometimes "checking out"). There are many guides to working with a Source Control system on the web and i won't dive into its theory of operation in a team environment. I will, however, offer a simple and free way of using Source Control in your project, even if you are a hobbyist developing stuff in your spare time. I'm a single developer - Why should I care? As a single developer, you gain one huge advantage of using Source Control - the ability to save the state of your project at any time, with a single click. This allows you to easily revert any changes you have made and make all manual backups of source redundant. Even if you are slightly modifying your code - and you know that the code works in its current state - save a snapshot. You will feel so confident changing the code because you know that at a click of a button you will be able to revert your changes to any previous working state. What to install:
Keep in mind that you can install both the client and server on the same machine or put the server on a different machine,. The server does not take any resources during normal operation, but it may be beneficiary to do so for safety reasons (if someone steals/hacks into/destroys your client machine, your code is still safe at the server). After installing VisualSVN, follow the tutorial above to create a repository. A repository is, in essence, just a directory that holds versions of any files you give it - it is up to you to decide how the repository looks like and how many projects (or project) it contains. Thankfully, we don't have to think too hard as there is a logical standard for this: simply create a repository per project, naming the repository after the project. When you create a repository, you are allowed the option of letting VisualSVN create a default sub structure for it. This is optional, but is recommended as this sub structure is well known and intuitive to most programmers working with SVN. This substructure contains:
All of the above are not "special" sub folders and do not behave differently as far as SVN is concerned. You can choose not to follow this recommendation and find a sub structure that works for you. |
Comments
Have you tried JVCS, for Delphi it is perfect !
Best