CSC/ECE 517 Spring 2015/ch1b 27 VC

From Expertiza_Wiki
Jump to navigation Jump to search

Version Control Systems Integration


Introduction

Version control systems are simply repositories of files which contain the source code various computer programs. These systems provides monitored access to various users and enhances the distributive and collaborative development. Every change in the source code is logged along with the details of the collaborator and reasons for modification of the code. In Resource development which is generally carried out in teams, version controls plays the vital role in making the development easy. With version control every person in the team can work on the copy of the resources developed by other members of the team, make the necessary modifications and merge the changes with the modifications of other members. The two widely used version control systems are the centralized version control and distributed version control. The main idea of the centralized version control is to have a central copy of the project typically on a server and the collaborators will make their changes to that central copy. In distributed version control system each programmer will be able to make a copy the project file and make necessary changes. While both the systems have their own advantages and disadvantages, they are chosen based on the requirements of the project. In some cases a hybrid of both the systems can also be employed. The key features and advantages of version control systems are · Tracking changes: As said earlier, tracking changes in the source code is one of the central ideas of the version control systems. Each and every change to the source code by the collaborators can be tracked so that if any change results in unpredicted/undesired output, the changes can be rolled back to the previous versions. · Committing: Instead of saving each and every change, version control systems allows individuals to submit the changes as a collection of actions. This collection of actions is known as committing in version control. · Branching and Merging: Branching allows the individuals to make a copy of the repository that can be modified in parallel without altering the remote repository. Branching also allows to commit changes to the local copy rather than directly committing changes to the master file. The changes made in the local repo can be merged with the changes of the remote repo which is called nothing but “Merging”. https://www.atlassian.com/dvcs/overview/what-is-version-control

VCS in RubyMine

https://www.jetbrains.com/ruby/features/ruby_version_control.html -1 http://git-scm.com/about The various version control systems and the features supported by the RubyMine are Git, Subversion, CVS, Mercurial, Github.

                  • Explain the VCS in RubyMine******

The various features supported by RubyMine can be found here (hyperlink to1). Here is a short introduction to the various version control systems in RubyMine. http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS: CVS is the oldest version control system and has a centralized architecture. It follows a client server architecture in which the projects are stored on the server. The two basic operations in this architecture are “check out” and “check in”. The client can check out the complete copy of a project file, make necessary changes and then check-in the file onto the server. Whenever a check-in is successful the version numbers of all the files in the project are incremented. Problem arises when multiple developers work on the same file remotely and try to check-in different versions. CVS overcomes this problem by accepting changes only to the latest version of the file. One problem with CVS is it doesn’t support rename tracking of the files. If renaming is done manually then the history might become invalid and we may not be able to recover the project state before rename. http://subversion.apache.org/ Subversion: This is probably the most adopted version control system. It has a centralized client/server architecture. It was originally designed to be a better CVS. But its evolution far exceeded its primary goal of replacing CVS. Apart from having all the features of CVS, it contains many additional features such as versioning directories, atomic commits, merge tracking and file locking. SVN versions copying, deleting and renaming. The version numbers are per-commit and not per-file. No part of a commit takes effect until the entire has succeeded. S Git : Git is free open source distributed version control system. With the Git integration enabled in RubyMine we can perform a range of basic Git operations. Git’s branching model is central feature which makes it stand apart from other version control systems. Git allows to have multiple local branches of the same file and the operations on the local files do not affect the remote repository unless and until the changes are pushed to the master. This offers more flexibility in trying out new ideas on the projects by providing the opportunity to switch back to the previous versions in case the idea doesn’t work the way it was designed to. Also all the branches need not be pushed to the remote repository. Only the branches in which changes are made can be pushed. Other VCSs also accomplish this tasks but it is incredibly easy in git. One feature that is unique in git is “Staging”. This is an intermediate stage wherein the commits can be formatted and reviewed before completing the commit. Each change can be committed separately in different commits. “git add “ brings a file to staging and “git commit” completes committing the changes. This feature can also be disabled using git commit –a. Github helped in establishing git as a great version control by providing an excellent front end for many projects. However, Git is not as easy and simple compared to CVS, SVN and Mercurial. But git has the advantage that it is suitable when all the developers are not connected to the master repo. http://mercurial.selenic.com/about -2 Mercurial: It is a distributed version control system like git. This is mainly designed for larger projects. Its key features are distributed architecture, it is fast, platform independent, extensible, easy to use and is open source. More information on Mercurial can be found here [hyperlink to 2].