Have you ever tried working on a collaborative project involving multiple contributors without using any special software to manage versions or track changes in files? Just trying to keep track of which file is the latest version of a particular document will be enough to cause many a headache!
Version Control Systems (VCS) on the other hand, are computer software designed specifically to track changes in documents, images, programming codes and other types of files. These tools allow the user to trivially identify the latest version of files, and also retrieve older versions of the files if needed. One of the most popular free version control systems is called Subversion, or SVN for short.
This article provides some basic introductory information that you need to understand in order to do version control with Subversion. Let’s start by defining terminologies.
Versioning is a process where the state of a project is committed or saved at a certain point in time. In software development, versioning is necessary for the improvement of the project while still being able to track the changes from previous revisions. This process also ensures that people are working with the latest revision of the files.
The repository is a database where all the file data is saved. It contains the contents of all the files that comprise the project, together with all their previous revisions. In the repository, anyone can check-out a copy of the files onto their local machine, but only an authenticated author can check-in files.
A revision number is used to track all the files inside the repository. With Subversion, this number is incremented by one every time a new version is saved to the repository.
A working copy is a local copy of a particular version of the files. For example, consider a situation where you wish to work on a file in the repository. First, you have to “checkout” that file from the repository and save the file in your computer as a working copy. You then edit the file and make whatever changes you wish to make. When you have finished editing the working copy, it is then committed back to the repository and is saved with a new revision number.
Committing is the process whereby the local changes made in the working copy is sent back to the repository.
A working copy can also be updated with changes made by other uers. For example, consider a situation where you have checked out some files from the repository. In the meantime, someone else has also checked out one of the same files to make other changes and has since committed it back into the repository. You can then update your working copy to the latest version so it matches the revision in the database. This step is necessary to resolve any conflicts and avoid any problems when you commit the file into the repository.
Merging is a process whereby files from two different versions are combined into one final version. When files are merged, any conflicts that may arise must be resolved by the authors.
Now that you are familiar with some of the terms used in SVN, here is the workflow to manage version control in Subversion.
Thats basically it! This information should hopefully be enough get you started with version control with Subversion. Go and focus on your project, and let the software worry about tracking all the changes to your files!
You must be logged in to post a comment.