Wednesday 26 August 2015

SubVersion Prologue

SVN Pragmatic Version Control:


Version Control System:  (Time Machine)Exactly!!! The beginners will surely scared the hell out of this word “Version Control Systems”. It’s surely not a Critical On-going Project for the Planet Earth.
But when you open your mind of Reality, it is just a Time Machine!!!!The movie “The Butterfly Effect” is one of the best examples to explain the tool SVN.In the Movie “The Butterfly Effect” Actor John Patrick will blackout half of his memories, In order to overcome that, During his childhood days he will update every daily happenings and daily activities in his journal. And he will have some supernatural life after 18 years that lead him to alter his life. By travelling in to that part of the life by reading that journal.

Technically relating:

Diary : Repository

Contents or chapters in the diary : VersionI know it will be very complicated for the beginners to understand. Going forward you can inter-relate everything and after you understand the basic concept you can understand this movie related example.Anyway try to watch this movie its really awesome J
Example Scenario: Consider Jack and Rose working in some complicated project. Jack is located in Banglore and Rose in chennai. Jack did some changes in the main line of the development and commited the codes.Rose after an hectic work from home came to office and updated her local copy and she founds there were hell lot of changes made to the development side, she is really worried whether that changes will affect her working nature. Although everyone has there seperate branch to work on the project individually.Rose founds that the Jack has merged his branch with the development, and now she is reall worried :( whetherher changes will reflect in the development area. Suddenly there was a call for Rose from jack stating that he is facing many problems because of the latest merge he made to the main line of the development.So Rose decided to check his branch and she decided to work to fix the bug. She found the problem and then she merged it with the main line of the development to check the changes and Bingo the bug is fixed :D. Now she doesnt need to worry about the changes made to the development because its not going toaffect her branch. Later the next day Jack cant make it to the office because he had suffered severe cold so he decided towork from home. All he need to do is to access the office network through a secure connection over the public network. 

For Tortoise SVN : http://tortoisesvn.net/downloads.html Version Control Advangtages:
  • Location independence.
  • Communication with the team.


Fetch back their old memories.(fetch back any memories of their collegues too)When the change is made and commited the second person can able to view the change. He cannot view half the change he can view only before or after the change. If your network goes down while performing a change it will put half of the change, instead it will roll back to the previous change. Subversion uses SSH network connection and Apache web server so that the availablity of the server over public network is attained. Repository:-All the data you store will move to the central master storage area called Repository.In other term the food you eat will get stored in your stomach. (stomach is your repository) Working Copy:  CheckoutYou cannot simply go to the repository and edit the files. Even in the repository you will not find the codes, instead it will contain the property files. So in order to make some changes you have to checkout to your local work area and you have to work on it.Export:This is completely different from the checkout. It will export the working copy to your local and you cannot make changes nor update from the repository. It is like creating a snapshot of the repository to your local.Commit :  At some point you will change your mind to save the changes or your working period to an end. At that time it is required from your side to make the changes to the repository. So you will commit the changes back to the repository.Update : When you jump back to the previous paragraph you will find commit. If the same scenario is followed by Jack, then if Rose wants to view the changes made by his friend then she needs to update the repository in order to view the change.Version Control Systems:There are simply two way to proceed with versioning
  • File-specific numbering
  • Repository wide numbering
File – specific numbering:  Consider you’re the Screen play writer of the well known TV series “Game of Thrones”. So as a Screen play writer it’s your role to change and modify the scenes according to the script. You’re storing all your scripts in your laptop which is a acting repository. You already finished Episode 1 and 2 and you stored that scene in your laptop which is nothing but committing your change now the change is stored as version (version 1). Now after 2 days your planning for a long trip with your family and your repository is untouched (laptop). During your tour you had a different thought about some scenes in the episode 1 and you want to make some changes immediately so after your family tour before starting to shoot episode 3 you want to make some changes with episode 1.After you made changes with episode 1 you again saved that script in your laptop. This will be your version 2 for the episode 1 and your episode 2 will be untouched since there is no change made to that episode. You finished with episode 3 and saved to your laptop now the version will be 1 for episode 3 and 2 for episode 1 and 1 for episode 2.  Repository wide numbering:This is followed in the SVN and the main difference in this technique Versioning.Following up with previous example:When you save new scenes for the episode 1 and it will get stored as version 1. Now after shooting episode 2 if you add that episode to your laptop then it will turn to version 2 (for all), after episode 3 is saved to the laptop then the version will be added as 3.  The version will be counted for each and every changes made to the laptop not individually come completely. So if you want to checkout and view the episode 4, then you have to check the comment and log and see at what version the episode 4 is committed to the repository or saved in your laptop.For example if it is version 112 then you have to put that version to view episode that particular episode. 

Branch Tag Merge:
Journey to the Game of Thrones………………..Consider the producers of Game of thrones wants to complete an episode within 2 months deadline, and then it will be a difficult job for the screenplay writers and director to co-up with the schedule. So they split in to two teams according to the script, if one portion of that episode has to shoot in Ireland and another portion in Scotland then they divide themselves in to two teams to their respective location to shoot the episode.

The two locations considered to be the “Branch” so that the parallel development is going on without touching the trunk “Game of thrones “series. Once the shoot is over they will return to the Merge area “Editing” where both the respective team from Scotland and Ireland will return to the editing area to merge all the scenes in to one episode.            

No comments:

Post a Comment