CSC/ECE 517 Fall 2010/ch1 1a mh: Difference between revisions
No edit summary |
No edit summary |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Introduction== | ==Introduction== | ||
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is | A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6]. | ||
Any software | Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. | ||
This chapter focuses mainly on the development history of different version control systems. | This wikibook chapter focuses mainly on the development history of different version control systems. | ||
==Why version control systems are needed?== | ==Why version control systems are needed?== | ||
Line 10: | Line 10: | ||
* Obviously, '''merging''' of a lot of files. If we consider somebody to do merging manually, The sheer volume of communication required is overwhelming. This communication can be among the developers themselves in a small team or between the team leader in charge of merging and the rest of the group. | * Obviously, '''merging''' of a lot of files. If we consider somebody to do merging manually, The sheer volume of communication required is overwhelming. This communication can be among the developers themselves in a small team or between the team leader in charge of merging and the rest of the group. | ||
* '''Accountability:''' if one of the developers breaks the code flow during development, It is tough to detect and naturally nobody steps forward to take the blame. A version control system can precisely indicate who caused the break in the code. | |||
* '''Accountability:''' if one of the | |||
* If a certain code implementation doesn't work as expected, '''Reverting''' to last satisfactory state may be required. | * If a certain code implementation doesn't work as expected, '''Reverting''' to last satisfactory state may be required. | ||
* '''Code loss''' | * Development on stale code may result in '''Code loss'''. for example, two developers downloaded a certain file at 10AM. One of the developers modified foo_1() method and uploaded modified file at 10:30AM.The other developer modified foo_2() method and uploaded the same file at 10:45AM. Since the functions are in the same file, the second upload will overwrite the file uploaded by first developer at 10:30AM causing loss of his part of work. | ||
* Even a lone coder might need to '''review''' why he made a certain change in code. Comments during code check-in can be a useful resource in such situation. | * Even a lone coder might need to '''review''' why he or she made a certain change in code. Comments during code check-in can be a useful resource in such situation. | ||
* Version control provides a form of '''documentation''' which makes tracking easy. i.e.-'''tagging''' is a kind of snapshot of all files and documents at a particular stage of development, usually during a stable release. This allows the developers to work with the exact files that were included in that release for bug-fixing purpose. | * Version control provides a form of '''documentation''' which makes tracking easy. i.e.-'''tagging''' is a kind of snapshot of all files and documents at a particular stage of development, usually during a stable release. This allows the developers to work with the exact files that were included in that release for bug-fixing purpose. | ||
* '''Sandboxing / Branching:''' Version control makes it possible to perform temporary code changes in an isolated area, usually in branch folder, for testing purpose. If the outcome is satisfactory then the code can be merged with the existing code, otherwise it can be discarded without having any impact on the main code. | |||
* Now a days, software development teams are spread across different countries and work at different time zones. Use of a version control system for project aggregation becomes unavoidable. | |||
== | ==Evolution of version control systems== | ||
VCS' can be broadly categorized into three groups based on the repository model. The sequence below follows the evolution of version control systems as well: | VCS' can be broadly categorized into three groups based on the repository model. The sequence below follows the evolution of version control systems as well: | ||
==='''Local repository model'''=== | |||
# | Local version control systems had one storage location of the files. It was called local because it didn't support networked commands or access like the other later softwares. So, all the developers had to use same computer system to access or modify files. | ||
# | #'''[http://en.wikipedia.org/wiki/Source_Code_Control_System Source Code Control System (SCCS)]''' is one of the pioneer source code revision softwares.[5] SCCS was developed at Bell Labs in 1972 by Marc J. Rochkind. Although it was originally developed for OS/MVT, SCCS was included in [http://en.wikipedia.org/wiki/Source_Code_Control_System some UNIX distributions.] SCCS ruled as the dominant VCS until ''Revision Control System'' was released. | ||
#'''[http://en.wikipedia.org/wiki/Revision_Control_System Revision Control System(RCS)]''' automated storing, retrieval, logging, identification, and merging frequent revisions of texts. RCS was first released in 1982 by Walter F. Tichy as an alternative to SCCS. It quickly gained popularity and almost replaced SCCS.[9] | |||
::RCS performed better by storing the most recent copy of file and then storing only reverse differences called "deltas".One of the shortcomings of RCS was that only one person at a time could edit the file. RCS could manage only single files, not a whole project or directory. | |||
::Ref.[3] is a comprehensive book on CSSC and RCS. | |||
==='''Client-server model'''=== | |||
The [http://en.wikipedia.org/wiki/Client%E2%80%93server_model client-server model] utilizes a single repository for the version control which is accessible to the developers through network or internet. | |||
Subversion. | #'''[http://en.wikipedia.org/wiki/Concurrent_Versions_System Concurrent Versions System (CVS)]''' was one of the early client-server model based scheme. Dick Grune started developing CVS from 1984-1985 to allow his students to collaborate in a project according to their schedule. CVS was publicly released at 1986.The main improvement for CVS over RCS was that CVS could manage the whole project while RCS could only work on a file at a time.At the beginning, CVS was script based and called RCS at background. Later it was developed into a full fledged program. A lot of the IDE's (Emacs, Eclipse/aptana,Netbeans, Komodo, PHPEdit etc.) support CVS. CVSNT is a cross platform port of CVS with some modification. OpenCVS puts more emphasis on security.CVS check-in was not an [http://en.wikipedia.org/wiki/Atomic_commit atomic] operation.So, if check-in process was disturbed, it could result in damage of existing project at repository. | ||
#CollabNet started developing '''[http://en.wikipedia.org/wiki/Subversion_%28software%29 Subversion (SVN)]''' as a successor of CVS with added [http://en.wikipedia.org/wiki/Subversion_(software)#Features functionality][2][7]. Different open source projects (i.e.-[http://en.wikipedia.org/wiki/Apache_Software_Foundation Apache Software Foundation],[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby],[http://en.wikipedia.org/wiki/SourceForge SourceForge],[http://en.wikipedia.org/wiki/Tigris.org Tigris.org], [http://en.wikipedia.org/wiki/PHP PHP], [http://en.wikipedia.org/wiki/Python_(programming_language) Python] and [http://en.wikipedia.org/wiki/MediaWiki MediaWiki]) use Subversion. Subversion is an open source software due to it's Apache license[1]. [[Image:Subversion_project_visualization.svg.png|650px|thumb|center|Visualization of a very simple Subversion project. Source:wikimedia commons, Explanation of terms can be found at http://en.wikipedia.org/wiki/Apache_Subversion, "Branching and tagging" and at http://en.wikipedia.org/wiki/Revision_control, #"Common vocabulary"]] | |||
# Some proprietary client-server based version control softwares are- | |||
#:*[http://en.wikipedia.org/wiki/Autodesk_Vault Autodesk Vault] was specifically developed for Autodesk applications. | #:*[http://en.wikipedia.org/wiki/Autodesk_Vault Autodesk Vault] was specifically developed for Autodesk applications. | ||
#:*[http://en.wikipedia.org/wiki/IBM_Rational_ClearCase ClearCase] was developed by IBM Rational Software. It's a Source Code Control (SCC) compliant software. | #:*[http://en.wikipedia.org/wiki/IBM_Rational_ClearCase ClearCase] was developed by IBM Rational Software. It's a Source Code Control (SCC) compliant software. | ||
#:*[http://en.wikipedia.org/wiki/Visual_SourceSafe Visual SourceSafe] is developed by Microsoft targeting small development team. | #:*[http://en.wikipedia.org/wiki/Visual_SourceSafe Visual SourceSafe] is developed by Microsoft targeting small development team. | ||
#:*[http://en.wikipedia.org/wiki/Visual_Studio_Team_System Visual Studio Team System] is also developed by Microsoft targeting larger groups. | #:*[http://en.wikipedia.org/wiki/Visual_Studio_Team_System Visual Studio Team System] is also developed by Microsoft targeting larger groups. | ||
===Distributed model=== | |||
#[http://en.wikipedia.org/wiki/Monotone_%28software%29 Monotone] and [http://en.wikipedia.org/wiki/GNU_arch GNU arch] were the first generation DVCS (release:2001-2003) followed by [http://en.wikipedia.org/wiki/Darcs Darcs] (stable release:2010).[http://en.wikipedia.org/wiki/Mercurial Mercurial] , [http://en.wikipedia.org/wiki/Git_%28software%29 Git] and [http://en.wikipedia.org/wiki/Bazaar_%28software%29 Bazaar] (2005-2007) are well adopted among developers. | '''Distributed Version Control (DVCS)''', or '''Decentralized Version Control''' systems can have many central repositories.This is a peer to peer approach. The concept started developing at late 90's. In DVCS. Each developer works with his or her local repository and the changes are synchronized between repositories upon commit. DVCS are better suited for large teams with partially independent developers. i.e.- opensource software development.[8] | ||
#[http://en.wikipedia.org/wiki/BitKeeper BitKeeper],[ | ##[http://en.wikipedia.org/wiki/Monotone_%28software%29 Monotone] and [http://en.wikipedia.org/wiki/GNU_arch GNU arch] were the first generation DVCS (release:2001-2003) followed by [http://en.wikipedia.org/wiki/Darcs Darcs] (stable release:2010).[http://en.wikipedia.org/wiki/Mercurial Mercurial] , [http://en.wikipedia.org/wiki/Git_%28software%29 Git] and [http://en.wikipedia.org/wiki/Bazaar_%28software%29 Bazaar] (2005-2007) are well adopted among developers. | ||
##[http://en.wikipedia.org/wiki/BitKeeper BitKeeper],[http://en.wikipedia.org/wiki/Code_Co-op Code Co-op], [http://en.wikipedia.org/wiki/Sun_WorkShop_TeamWare Sun WorkShop TeamWare] are some proprietary DVCS softwares. | |||
It should be noted that many distributed version control softwares support client-server model too.One of the benefits of DVCS is that a developer can save the source code as long as he wants even if the central repository (in client-server model) is discarded at the end of a project. | |||
[[Image:timeline.jpg|650px|thumb|center|A generalized timeline. Source:http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av]] | |||
==Use of version control in other areas == | |||
Now a days, many document editing softwares have adopted version control. Wikis, GoogleDoc, Microsoft Office and OpenOffice.org suite are some example softwares that can save previous document editing history. | |||
==Other considerations== | |||
Most open source softwares have [http://linuxmafia.com/faq/Apps/vcs.html distributions for Linux] OS. In most open source cases, Linux and windows versions are released concurrently. | |||
Most open source softwares have [http://linuxmafia.com/faq/Apps/vcs.html Linux | Many VCS' have plugins for common IDEs like Eclipse, Visual Studio, Oracle JDeveloper etc. NetBeans IDE and Xcode has integrated version control support. | ||
==References== | ==References== | ||
1. [http://subversion.apache.org/news.html#news-20100217. Apache Software Foundation Announcements, "Subversion becomes Apache Subversion".(2010-02-17) Accessed:September 2010 ] | |||
2. [http://svnbook.red-bean.com/ Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato. "Version Control with Subversion", an O'Reilly book available online. Accessed:September 2010] | |||
3. Don Bolinger, Tan Bronson: Applying RCS and SCCS. O'Reilly Media. ISBN:978-1-56592-117-7 | |||
4. [http://www.ericsink.com/scm/source_control.html Eric Sink: A collection of articles on source control and best practices, Accessed:September 2010] | |||
[http:// | 5. [http://basepath.com/aup/talks/SCCS-Slideshow.pdf M. J. Rochkind: The Source Code Control System.] In IEEE Transactions on Software Engineering SE-1:4 (Dec. 1975), pages 364–370. | ||
[http:// | 6. [http://onlinelibrary.wiley.com/doi/10.1002/bltj.2039/pdf Martin, Robert L. (2002). "Software configuration management for the 21st century". Bell Labs technical journal, Volume 2, Issue 1, page- 154.] | ||
Mike Mason; Pragmatic Version Control Using Subversion; Pragmatic Bookshelf; ISBN 0-9745140-6-3 (1st edition, paperback, 2005) | 7. Mike Mason; Pragmatic Version Control Using Subversion; Pragmatic Bookshelf; ISBN 0-9745140-6-3 (1st edition, paperback, 2005) | ||
[http:// | 8. [http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/ Noah Gift,Adam Shand: Introduction to distributed version control systems (compare how to use Bazaar, Mercurial, and Git) (Apr 2009), IBM Technical Library, Accessed:September 2010 ] | ||
9.[http://onlinelibrary.wiley.com/doi/10.1002/spe.4380150703/abstract Walter F. Tichy; Rcs - a system for version control; In Software: Practice and Experience. Volume 15, Issue 7,(July 1985) pages 637–654 ] | |||
== | ==See also== | ||
[http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision control] | [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision control] | ||
[http://en.wikipedia.org/wiki/List_of_revision_control_software Wikipedia: List of revision control software] | [http://en.wikipedia.org/wiki/List_of_revision_control_software Wikipedia: List of revision control software] | ||
[http://www.nongnu.org/cvs/ CVS] | [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Wikipedia: Detail comparison of revision control softwares] | ||
[http://www.nongnu.org/cvs/ CVS webpage] | |||
[http://www.cs.vu.nl/~dick/ Dick Grune's website on CVS history] | [http://www.cs.vu.nl/~dick/ Dick Grune's website on CVS history] | ||
[http://groups.google.com/group/mod.sources/msg/2ebab72ac0744fb8?dmode=source The original usenet post | [http://groups.google.com/group/mod.sources/msg/2ebab72ac0744fb8?dmode=source The original usenet post on CVS] archived at google groups. | ||
[http://linuxmafia.com/faq/Apps/vcs.html Linux availability of various version control softwares] |
Latest revision as of 16:19, 18 September 2010
Introduction
A version control system (VCS) is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or software configuration management (SCM)[6].
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge.
This wikibook chapter focuses mainly on the development history of different version control systems.
Why version control systems are needed?
The major issues in a dynamic development environment can be described as:
- Obviously, merging of a lot of files. If we consider somebody to do merging manually, The sheer volume of communication required is overwhelming. This communication can be among the developers themselves in a small team or between the team leader in charge of merging and the rest of the group.
- Accountability: if one of the developers breaks the code flow during development, It is tough to detect and naturally nobody steps forward to take the blame. A version control system can precisely indicate who caused the break in the code.
- If a certain code implementation doesn't work as expected, Reverting to last satisfactory state may be required.
- Development on stale code may result in Code loss. for example, two developers downloaded a certain file at 10AM. One of the developers modified foo_1() method and uploaded modified file at 10:30AM.The other developer modified foo_2() method and uploaded the same file at 10:45AM. Since the functions are in the same file, the second upload will overwrite the file uploaded by first developer at 10:30AM causing loss of his part of work.
- Even a lone coder might need to review why he or she made a certain change in code. Comments during code check-in can be a useful resource in such situation.
- Version control provides a form of documentation which makes tracking easy. i.e.-tagging is a kind of snapshot of all files and documents at a particular stage of development, usually during a stable release. This allows the developers to work with the exact files that were included in that release for bug-fixing purpose.
- Sandboxing / Branching: Version control makes it possible to perform temporary code changes in an isolated area, usually in branch folder, for testing purpose. If the outcome is satisfactory then the code can be merged with the existing code, otherwise it can be discarded without having any impact on the main code.
- Now a days, software development teams are spread across different countries and work at different time zones. Use of a version control system for project aggregation becomes unavoidable.
Evolution of version control systems
VCS' can be broadly categorized into three groups based on the repository model. The sequence below follows the evolution of version control systems as well:
Local repository model
Local version control systems had one storage location of the files. It was called local because it didn't support networked commands or access like the other later softwares. So, all the developers had to use same computer system to access or modify files.
- Source Code Control System (SCCS) is one of the pioneer source code revision softwares.[5] SCCS was developed at Bell Labs in 1972 by Marc J. Rochkind. Although it was originally developed for OS/MVT, SCCS was included in some UNIX distributions. SCCS ruled as the dominant VCS until Revision Control System was released.
- Revision Control System(RCS) automated storing, retrieval, logging, identification, and merging frequent revisions of texts. RCS was first released in 1982 by Walter F. Tichy as an alternative to SCCS. It quickly gained popularity and almost replaced SCCS.[9]
- RCS performed better by storing the most recent copy of file and then storing only reverse differences called "deltas".One of the shortcomings of RCS was that only one person at a time could edit the file. RCS could manage only single files, not a whole project or directory.
- Ref.[3] is a comprehensive book on CSSC and RCS.
Client-server model
The client-server model utilizes a single repository for the version control which is accessible to the developers through network or internet.
- Concurrent Versions System (CVS) was one of the early client-server model based scheme. Dick Grune started developing CVS from 1984-1985 to allow his students to collaborate in a project according to their schedule. CVS was publicly released at 1986.The main improvement for CVS over RCS was that CVS could manage the whole project while RCS could only work on a file at a time.At the beginning, CVS was script based and called RCS at background. Later it was developed into a full fledged program. A lot of the IDE's (Emacs, Eclipse/aptana,Netbeans, Komodo, PHPEdit etc.) support CVS. CVSNT is a cross platform port of CVS with some modification. OpenCVS puts more emphasis on security.CVS check-in was not an atomic operation.So, if check-in process was disturbed, it could result in damage of existing project at repository.
- CollabNet started developing Subversion (SVN) as a successor of CVS with added functionality[2][7]. Different open source projects (i.e.-Apache Software Foundation,Ruby,SourceForge,Tigris.org, PHP, Python and MediaWiki) use Subversion. Subversion is an open source software due to it's Apache license[1].
- Some proprietary client-server based version control softwares are-
- Autodesk Vault was specifically developed for Autodesk applications.
- ClearCase was developed by IBM Rational Software. It's a Source Code Control (SCC) compliant software.
- Visual SourceSafe is developed by Microsoft targeting small development team.
- Visual Studio Team System is also developed by Microsoft targeting larger groups.
Distributed model
Distributed Version Control (DVCS), or Decentralized Version Control systems can have many central repositories.This is a peer to peer approach. The concept started developing at late 90's. In DVCS. Each developer works with his or her local repository and the changes are synchronized between repositories upon commit. DVCS are better suited for large teams with partially independent developers. i.e.- opensource software development.[8]
- Monotone and GNU arch were the first generation DVCS (release:2001-2003) followed by Darcs (stable release:2010).Mercurial , Git and Bazaar (2005-2007) are well adopted among developers.
- BitKeeper,Code Co-op, Sun WorkShop TeamWare are some proprietary DVCS softwares.
It should be noted that many distributed version control softwares support client-server model too.One of the benefits of DVCS is that a developer can save the source code as long as he wants even if the central repository (in client-server model) is discarded at the end of a project.
Use of version control in other areas
Now a days, many document editing softwares have adopted version control. Wikis, GoogleDoc, Microsoft Office and OpenOffice.org suite are some example softwares that can save previous document editing history.
Other considerations
Most open source softwares have distributions for Linux OS. In most open source cases, Linux and windows versions are released concurrently. Many VCS' have plugins for common IDEs like Eclipse, Visual Studio, Oracle JDeveloper etc. NetBeans IDE and Xcode has integrated version control support.
References
3. Don Bolinger, Tan Bronson: Applying RCS and SCCS. O'Reilly Media. ISBN:978-1-56592-117-7
4. Eric Sink: A collection of articles on source control and best practices, Accessed:September 2010
5. M. J. Rochkind: The Source Code Control System. In IEEE Transactions on Software Engineering SE-1:4 (Dec. 1975), pages 364–370.
7. Mike Mason; Pragmatic Version Control Using Subversion; Pragmatic Bookshelf; ISBN 0-9745140-6-3 (1st edition, paperback, 2005)
See also
Wikipedia: List of revision control software
Wikipedia: Detail comparison of revision control softwares
Dick Grune's website on CVS history
The original usenet post on CVS archived at google groups.