Don’t get scared from title, I just wanted the post title to look like ad smile_tongue  …

Firstly Definition of Version Control: Version Control is basically process of managing changes of any program, file or document in to some place. And so if we want — when we want , where we want we can reproduce the same result as it was at any given time. At high level view, Version Control is more like backup of system. That is my understanding of version control.

Uses : If you are a developer who develops code using any specific IDE, like Visual Studio, Mono, NetBeans, Eclipse or any … you always want to keep track of changed you have made during development cycle. It can be done by either remembering all changes by heart … or by keeping that project under version control system … (I dont know about you guys, but I prefer second choice thumbs_up) … things get even more complicated to manage when there are multiple developers are working on same project / file. In that case version control is a great help … it can be used to keep track of what changes are made and importantly WHO made it !!! (you don’t want to be blamed for something that you have not done right ??)

Now, there are many version / revision control software are available … some are open source , some are proprietary .. some are for windows , some are for linux , some are for both !! And they are also classified how they store / manage changes … either Client / Server model (data is stored in central shared repo. e.g. MSFT Team Foundation Server, Visual Source Safe(kind of ancestor of TFS smile_teeth) or my fav. Subversion) or Distributed Model (each developer has his own repo which is shared with other repo e.g. GIT)

With this background, lets talk about today’s post (yesssssssss … this is the actual beginning of post smile_wink)… I am using Tortoise SVN, it is client for Subversion (now Apache Subversion) … I like to use Tortoise SVN mainly because its integration with windows shell, so I can access it via simple right click (it is very hand feature to include any dir to repo., which is good when I want to include my SQL Server’s DB Objects to version control)… and ofcourse because its open source and free smile_teeth

Following are screen shots are demo of few features Tortoise SVN has to offer.

TortoiseSVN_Demo (1) After Installation, right click at any location where you want to create central repository for use of Tortoise SVN, and select “SVN Create Repository Here” TortoiseSVN_Demo (2) when confirmed, you will see bunch of created files …
TortoiseSVN_Demo (3) Create any folder which is your work folder and create a test file into it… then right click on that folder and choose “SVN Import” from context options and you will be presented with screen … if want add some info into log .. TortoiseSVN_Demo (4) Now, create another folder say Work Folder 2 and right click on it, and select  “SVN Checkout” it will ask location of SVN repository and from there you can select which file/folder you want to import
TortoiseSVN_Demo (5) once done, it will have same content as of Repo. Also notice the “Green Mark” TortoiseSVN_Demo (6) now open and write something to that text file and you will see that “green mark” is now changed to “RED mark”
TortoiseSVN_Demo (10) now, right click on work folder 2 and select “Commit” to commit the changed to repo. and now again folder has “green mark” TortoiseSVN_Demo (13) Create another folder Work Folder 3 and say “SVN Checkout” again, but this time select “Revision = 1
TortoiseSVN_Demo (14) And voilla !! You have two different working version at two different places but from same Repo !! that’s real power of Version Control TortoiseSVN_Demo (7) Now for another test, delete that text file from Work Folder 2… then right click on folder and select “SVN Update”  and Ta-da you have your working copy restored !!

And this concludes Part I of, Version Control … Controlling Past and Present for Future …

I am not saying that I have some expert knowledge on Version Control or Tortoise SVN … I am just sharing what I have learned while using it. In next post, I will show you guys how we can use Subversion in Visual Studio 2010 for source control of our code and in SQL Server for version control database objects.

It’s Just a thought … fingerscrossed

Gaurang Sign

Random Posts:

Similar Posts: