Version Control with Subversion: Tortoise SVN

The word Version Control represents Revision Control or Source Control, which ultimately specify to control the source code, by managing multiple revisions of the same unit of information.

In simple words, we can say, Version Control System is a software that helps software developers to work together and also maintains complete history of their work by keeping all the work as per version.

Then, what is Subversion … 😕 …

Actually, Subversion is a free or open source version control system (VCS). That is, Subversion manages files and directories and it keeps the record of all the changes made to any file/folder. It keeps all the older revisions as history to examine the code in later time or to check how the data has been changed.

Apache Subversion which is often abbreviated as SVN, is a software versioning and revision control system distributed under an open source license.

Understood something … 🙂 nice 😎 … Let’s check the brief advantages of using it :).

Advantages :-
– Allow developers to work simultaneously.
– Centralized the code.
– Maintain complete history of all developers work.
– Do not overwrite each others changes.
– Enables collaboration between developers.
– Backup and restore the code.
– Short term and long term code revert.

There are a lot more advantages, which you will innovate while using SVN :P.

So, let’s check some terminology of SVN in rough manner.

Repository :-
Repository is a central location in which data is stored and managed. It is the heart/central part of any Version Control System. It keeps all the files, folders, history of data. It can be accessed over a network, as it will be stored in a central position. Repository acts as a server and version control tool acts as client. SVN client can connect to repository over network and can get/set the changes from/to repository, so that the latest changes will be visible to other developer/user by updating the changes.

Trunk :-
It is the main body of development. Generally, it is a directory where all the main development happens and that’s why is usually checked out by developers to work on the project.

Tags :-
Tags are markers to highlight notable revisions in the history of the repository. Usually it will be a point in time on the trunk or a branch that you wish to preserve. We mainly create tags to keep a preservation of a major release. This is the most stable point of the software before major revisions on the trunk were applied.

Branches :-
A branch will be a copy of code or side-line of development derived from a certain point to make larger, experimental, major changes to the code while preserving the untouched code in the trunk. If the major changes, experiment work according to plan, then they can be merged back to the trunk. Other developer can take an update of the working copy and can get the latest code.

SVN Commit :-
Commit means committing/saving the changes into repository. All users need to commit the changes he/she made to the code to make it available for other user.

SVN Update :-
Update means getting the latest data from repository. It brings changes from the repository into your working copy, so that you will get the latest changes made by any user. If we provide any revision number, then it brings the code till that revision, what committed. If no revision is given, it brings your working copy up to date with the HEAD revision.

SVN Log :-
It shows committed log messages from the repository. It will list the details of the committed files with comments, with date and time, when it got committed.

SVN Revert :-
Revert means, to go back to the previous step/stage what already have been accomplished. It reverts any local changes made to a file or directory, property changes made to any folder and it also resolves any conflicted state.

SVN Cleanup :-
It recursively clean up the working copy, removing locks from the working copy and resuming unfinished operations. If for some reason, a Subversion command cannot complete successfully, perhaps due to server problems, then working copy will get locked, then clean up command is necessary to unlock the process.

SVN Switch :-
Generally, switch means, relocating to any other place. Here, SVN switch update working copy to a different URL. If developer is currently on one branch, and done with the changes what has been asked for, then after committing the current branch, developer can now switch to the trunk or any other branch.

SVN Merge :-
SVN merge apply the differences between two sources to a working copy path. It is used to merge the specified files into the trunk so that the latest changes would be overwritten into the trunk, but then need to commit the changes on trunk, to be reflected for other users.

SVN Import :-
The svn import is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. SVN import doesn’t require a working copy, and the files are immediately committed to the repository.

 

Hmmm… We went through some of the terminology which is essential to know while using SVN.

So, please say, should we now use any of the Version Control or not to manage the code :-|.

If we got the points and advantages of using SVN, then :cool:, we are all set and now Ready … Steady … Go …… with Subversion :D.

Thanks 🙂 and will be happy to listen from you 🙂 :).

5 thoughts on “Version Control with Subversion: Tortoise SVN

  1. Pingback: Version Control with Subversion: Tortoise SVN – III | Tech Tricks

Leave a comment