<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rgowda</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rgowda"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Rgowda"/>
	<updated>2026-06-03T13:30:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54286</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54286"/>
		<updated>2011-10-29T20:10:04Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Superclass_%28computer_science%29#Subclasses_and_superclasses Super classes] of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* [http://download.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces]&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements  [http://en.wikipedia.org/wiki/Dynamic_dispatch dynamic binding] of objects. Dynamic binding plays a very important role in [http://en.wikipedia.org/wiki/Metaprogramming meta-programming].&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Symbol_%28programming%29 Symbols] are objects used to represent names and strings inside a Ruby [http://en.wikipedia.org/wiki/Interpreter_%28computing%29 interpreter]. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-send Send] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-respond_to-3F respond_to] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj = Object.new&lt;br /&gt;
if obj.respond_to?(:program)&lt;br /&gt;
  obj.program&lt;br /&gt;
else&lt;br /&gt;
  puts &amp;quot;Sorry, the object doesn't understand the 'program' message.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named '[http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html#Object.method_missing method_missing]'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a [http://www.ruby-doc.org/core-1.9.2/NoMethodError.html NoMethodError].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Method_overriding Overriding] 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals &amp;lt;ref&amp;gt;http://www.rubyquiz.com/quiz22.html&amp;lt;/ref&amp;gt; to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end   &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
''' Example 3 '''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Performer&lt;br /&gt;
  def method_missing(name, *args)&lt;br /&gt;
    &amp;quot;The duck will #{name}: #{args[0]}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
duck = Performer.new&lt;br /&gt;
duck.sing(&amp;quot;Quacking in the Rain&amp;quot;) # =&amp;gt; &amp;quot;The duck will sing: Quacking in the Rain&amp;quot;&lt;br /&gt;
duck.dance(&amp;quot;Swan Lake&amp;quot;) # =&amp;gt; &amp;quot;The duck will dance: Swan Lake&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This article makes an attempt to explain the concept of Reflection in Object Oriented Programming. The article mentions the different approaches to reflection in Ruby and other languages.It mentions the usage of Reflections and the advantages and disadvantages of using Reflection. A follow up to this article would be to study the concept of [http://en.wikipedia.org/wiki/Metaprogramming Metaprogramming].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;br /&gt;
*[http://ruby-doc.org/docs/ProgrammingRuby/html/builtins.html Ruby Documentation]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54285</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54285"/>
		<updated>2011-10-29T19:57:48Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Additional Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Superclass_%28computer_science%29#Subclasses_and_superclasses Super classes] of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* [http://download.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces]&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements  [http://en.wikipedia.org/wiki/Dynamic_dispatch dynamic binding] of objects. Dynamic binding plays a very important role in [http://en.wikipedia.org/wiki/Metaprogramming meta-programming].&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Symbol_%28programming%29 Symbols] are objects used to represent names and strings inside a Ruby [http://en.wikipedia.org/wiki/Interpreter_%28computing%29 interpreter]. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-send Send] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-respond_to-3F respond_to] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj = Object.new&lt;br /&gt;
if obj.respond_to?(:program)&lt;br /&gt;
  obj.program&lt;br /&gt;
else&lt;br /&gt;
  puts &amp;quot;Sorry, the object doesn't understand the 'program' message.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named '[http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html#Object.method_missing method_missing]'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a [http://www.ruby-doc.org/core-1.9.2/NoMethodError.html NoMethodError].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Method_overriding Overriding] 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals &amp;lt;ref&amp;gt;http://www.rubyquiz.com/quiz22.html&amp;lt;/ref&amp;gt; to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end   &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
''' Example 3 '''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Performer&lt;br /&gt;
  def method_missing(name, *args)&lt;br /&gt;
    &amp;quot;The duck will #{name}: #{args[0]}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
duck = Performer.new&lt;br /&gt;
duck.sing(&amp;quot;Quacking in the Rain&amp;quot;) # =&amp;gt; &amp;quot;The duck will sing: Quacking in the Rain&amp;quot;&lt;br /&gt;
duck.dance(&amp;quot;Swan Lake&amp;quot;) # =&amp;gt; &amp;quot;The duck will dance: Swan Lake&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This article makes an attempt to explain the concept of Reflection in Object Oriented Programming. The article mentions the different approaches to reflection in Ruby and other languages.A follow up to this article would be to study the concept of [http://en.wikipedia.org/wiki/Metaprogramming Metaprogramming].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;br /&gt;
*[http://ruby-doc.org/docs/ProgrammingRuby/html/builtins.html Ruby Documentation]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54284</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54284"/>
		<updated>2011-10-29T19:56:45Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Superclass_%28computer_science%29#Subclasses_and_superclasses Super classes] of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* [http://download.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces]&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements  [http://en.wikipedia.org/wiki/Dynamic_dispatch dynamic binding] of objects. Dynamic binding plays a very important role in [http://en.wikipedia.org/wiki/Metaprogramming meta-programming].&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Symbol_%28programming%29 Symbols] are objects used to represent names and strings inside a Ruby [http://en.wikipedia.org/wiki/Interpreter_%28computing%29 interpreter]. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-send Send] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-respond_to-3F respond_to] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj = Object.new&lt;br /&gt;
if obj.respond_to?(:program)&lt;br /&gt;
  obj.program&lt;br /&gt;
else&lt;br /&gt;
  puts &amp;quot;Sorry, the object doesn't understand the 'program' message.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named '[http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html#Object.method_missing method_missing]'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a [http://www.ruby-doc.org/core-1.9.2/NoMethodError.html NoMethodError].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Method_overriding Overriding] 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals &amp;lt;ref&amp;gt;http://www.rubyquiz.com/quiz22.html&amp;lt;/ref&amp;gt; to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end   &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
''' Example 3 '''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Performer&lt;br /&gt;
  def method_missing(name, *args)&lt;br /&gt;
    &amp;quot;The duck will #{name}: #{args[0]}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
duck = Performer.new&lt;br /&gt;
duck.sing(&amp;quot;Quacking in the Rain&amp;quot;) # =&amp;gt; &amp;quot;The duck will sing: Quacking in the Rain&amp;quot;&lt;br /&gt;
duck.dance(&amp;quot;Swan Lake&amp;quot;) # =&amp;gt; &amp;quot;The duck will dance: Swan Lake&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
This article makes an attempt to explain the concept of Reflection in Object Oriented Programming. The article mentions the different approaches to reflection in Ruby and other languages.A follow up to this article would be to study the concept of [http://en.wikipedia.org/wiki/Metaprogramming Metaprogramming].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;br /&gt;
*[http://ruby-doc.org/docs/ProgrammingRuby/html/builtins.html]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54283</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54283"/>
		<updated>2011-10-29T19:45:07Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Superclass_%28computer_science%29#Subclasses_and_superclasses Super classes] of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* [http://download.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces]&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements  [http://en.wikipedia.org/wiki/Dynamic_dispatch dynamic binding] of objects. Dynamic binding plays a very important role in [http://en.wikipedia.org/wiki/Metaprogramming meta-programming].&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Symbol_%28programming%29 Symbols] are objects used to represent names and strings inside a Ruby [http://en.wikipedia.org/wiki/Interpreter_%28computing%29 interpreter]. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-send Send] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://ruby-doc.org/core-1.9.2/Object.html#method-i-respond_to-3F respond_to] method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj = Object.new&lt;br /&gt;
if obj.respond_to?(:program)&lt;br /&gt;
  obj.program&lt;br /&gt;
else&lt;br /&gt;
  puts &amp;quot;Sorry, the object doesn't understand the 'program' message.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named '[http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html#Object.method_missing method_missing]'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a [http://www.ruby-doc.org/core-1.9.2/NoMethodError.html NoMethodError].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Method_overriding Overriding] 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals &amp;lt;ref&amp;gt;http://www.rubyquiz.com/quiz22.html&amp;lt;/ref&amp;gt; to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
''' Example 3 '''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Performer&lt;br /&gt;
  def method_missing(name, *args)&lt;br /&gt;
    &amp;quot;The duck will #{name}: #{args[0]}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
duck = Performer.new&lt;br /&gt;
duck.sing(&amp;quot;Quacking in the Rain&amp;quot;) # =&amp;gt; &amp;quot;The duck will sing: Quacking in the Rain&amp;quot;&lt;br /&gt;
duck.dance(&amp;quot;Swan Lake&amp;quot;) # =&amp;gt; &amp;quot;The duck will dance: Swan Lake&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;br /&gt;
*[http://ruby-doc.org/docs/ProgrammingRuby/html/builtins.html]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54282</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54282"/>
		<updated>2011-10-29T19:38:31Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Superclass_%28computer_science%29#Subclasses_and_superclasses Super classes] of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* [http://download.oracle.com/javase/tutorial/java/concepts/interface.html Interfaces]&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements  [http://en.wikipedia.org/wiki/Dynamic_dispatch dynamic binding] of objects. Dynamic binding plays a very important role in [http://en.wikipedia.org/wiki/Metaprogramming meta-programming].&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Symbol_%28programming%29 Symbols] are objects used to represent names and strings inside a Ruby [http://en.wikipedia.org/wiki/Interpreter_%28computing%29 interpreter]. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
obj = Object.new&lt;br /&gt;
if obj.respond_to?(:program)&lt;br /&gt;
  obj.program&lt;br /&gt;
else&lt;br /&gt;
  puts &amp;quot;Sorry, the object doesn't understand the 'program' message.&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named '[http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html#Object.method_missing method_missing]'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a [http://www.ruby-doc.org/core-1.9.2/NoMethodError.html NoMethodError].&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Method_overriding Overriding] 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals &amp;lt;ref&amp;gt;http://www.rubyquiz.com/quiz22.html&amp;lt;/ref&amp;gt; to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
''' Example 3 '''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Performer&lt;br /&gt;
  def method_missing(name, *args)&lt;br /&gt;
    &amp;quot;The duck will #{name}: #{args[0]}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
duck = Performer.new&lt;br /&gt;
duck.sing(&amp;quot;Quacking in the Rain&amp;quot;) # =&amp;gt; &amp;quot;The duck will sing: Quacking in the Rain&amp;quot;&lt;br /&gt;
duck.dance(&amp;quot;Swan Lake&amp;quot;) # =&amp;gt; &amp;quot;The duck will dance: Swan Lake&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54281</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=54281"/>
		<updated>2011-10-29T19:06:44Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common computer programming concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith&amp;lt;ref&amp;gt;[http://hdl.handle.net/1721.1/15961 Brian Cantwell Smith, Procedural Reflection in Programming Languages, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, PhD Thesis, 1982.]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://publications.csail.mit.edu/lcs/specpub.php?id=840 Brian C. Smith. Reflection and semantics in a procedural language. Technical Report MIT-LCS-TR-272, Massachusetts Institute of Technology, Cambridge, Mass., January 1982.]&amp;lt;/ref&amp;gt; in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* Super classes of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* Interfaces&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements dynamic binding of objects. Dynamic binding plays a very important role in metaprogramming.&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
Symbols are objects used to represent names and strings inside a Ruby interpreter. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named 'method_missing'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a NoMethodError.&lt;br /&gt;
&lt;br /&gt;
Overriding 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53756</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53756"/>
		<updated>2011-10-21T01:53:53Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Reflection is a relatively common computer programming concept where in the program has the inherant ability to examine itself at runtime. Based on its observations the program can modify it's behaviour for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* Super classes of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* Interfaces&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as introspection and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements dynamic binding of objects. Dynamic binding plays a very important role in metaprogramming.&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
Symbols are objects used to represent names and strings inside a Ruby interpreter. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named 'method_missing'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a NoMethodError.&lt;br /&gt;
&lt;br /&gt;
Overriding 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
'''Example1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''Example2'''&lt;br /&gt;
Using method_missing to convert Roman numerals to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53741</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53741"/>
		<updated>2011-10-21T01:48:49Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Reflection is a relatively common computer programming concept where in the program has the inherant ability to examine itself at runtime. Based on its observations the program can modify it's behaviour for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* Super classes of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* Interfaces&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as introspection and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements dynamic binding of objects. Dynamic binding plays a very important role in metaprogramming.&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
Symbols are objects used to represent names and strings inside a Ruby interpreter. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named 'method_missing'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a NoMethodError.&lt;br /&gt;
&lt;br /&gt;
Overriding 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Example2===&lt;br /&gt;
Using method_missing to convert Roman numerals to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53737</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53737"/>
		<updated>2011-10-21T01:47:12Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Reflection is a relatively common computer programming concept where in the program has the inherant ability to examine itself at runtime. Based on its observations the program can modify it's behaviour for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* Super classes of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* Interfaces&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as introspection and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements dynamic binding of objects. Dynamic binding plays a very important role in metaprogramming.&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
[[File:Slicing.gif]]&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Before_binding.png]]        [[File:After_binding.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
Symbols are objects used to represent names and strings inside a Ruby interpreter. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named 'method_missing'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a NoMethodError.&lt;br /&gt;
&lt;br /&gt;
Overriding 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Example2===&lt;br /&gt;
Using method_missing to convert Roman numerals to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reflection_(computer_programming) Reflection]&lt;br /&gt;
*[http://www.cs.indiana.edu/~jsobel/rop.html An Introduction to Reflection-Oriented Programming]&lt;br /&gt;
*[http://tutorials.jenkov.com/java-reflection/classes.html Java Reflection]&lt;br /&gt;
*[http://www.slideshare.net/CiaranMcHale/java-reflection-explained-simply Java reflection basics]&lt;br /&gt;
*[http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/malenfant/ref96/ref96.html A Tutorial on Behavioral Reflection and its Implementation]&lt;br /&gt;
*[http://www.quora.com/Computer-Programming/How-is-reflection-useful Uses of reflection]&lt;br /&gt;
*[http://download.oracle.com/javase/tutorial/reflect/index.html Java reflection official website]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Slicing.gif&amp;diff=53726</id>
		<title>File:Slicing.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Slicing.gif&amp;diff=53726"/>
		<updated>2011-10-21T01:42:40Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_binding.png&amp;diff=53725</id>
		<title>File:Before binding.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Before_binding.png&amp;diff=53725"/>
		<updated>2011-10-21T01:42:08Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:After_binding.png&amp;diff=53723</id>
		<title>File:After binding.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:After_binding.png&amp;diff=53723"/>
		<updated>2011-10-21T01:41:35Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53623</id>
		<title>CSC/ECE 517 Fall 2011/ch4 4f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_4f_rs&amp;diff=53623"/>
		<updated>2011-10-21T01:11:22Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Reflection is a relatively common computer programming concept where in the program has the inherant ability to examine itself at runtime. Based on its observations the program can modify it's behaviour for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation.&lt;br /&gt;
&lt;br /&gt;
Reflection as a concept was first introduced in the doctoral dissertation of Dr. Brian Cantwell Smith in 1992.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
Reflection is the ability of a program or a computation to examine and modify itself at run time even though it does not have enough information at compile time. For example in a high level object oriented language the ability to inspect its class , interfaces and methods at run time without knowing their names at compile time. It provides the ability to modify , instantiate and access to methods such as getter's and setter's of a class. Since the program need not have all the information at compile time it makes the program more dynamic.&lt;br /&gt;
&lt;br /&gt;
In the simple illustration provided below in ruby we can see how the name of a class can be obtained from the object and how we can get the ancestor classes and modules of a particular class. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5.class #=&amp;gt; Fixnum&lt;br /&gt;
&lt;br /&gt;
&amp;quot;hello&amp;quot;.class #=&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
String.ancestors #=&amp;gt; [String, Enumerable, Comparable, Object, Kernel]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Some of the common information that can be obtained from reflection are :&lt;br /&gt;
* Object type&lt;br /&gt;
* Super classes of any class&lt;br /&gt;
* Methods&lt;br /&gt;
* class fields&lt;br /&gt;
* Interfaces&lt;br /&gt;
&lt;br /&gt;
Common languages that exhibit reflection to varying degrees are Ruby, Java, Smalltalk, C# and more.&lt;br /&gt;
&lt;br /&gt;
== Types of reflection ==&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
* Behavioral Reflection: This type of reflection changes the behaviour of the execution of the program based on observation and modification.&lt;br /&gt;
* Structural Reflection: This type of reflection deals with changing the very structure of the program such as the data structures and flow of control in the program.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as introspection and intercession. These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
==Reflection by example==&lt;br /&gt;
===C#===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int val = 20;&lt;br /&gt;
System.Type type = val.GetType();&lt;br /&gt;
System.Console.WriteLine(type);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output is type of the variable &amp;quot;val&amp;quot; = System.Int32&lt;br /&gt;
&lt;br /&gt;
===Smalltalk===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
w := Workspace new.&lt;br /&gt;
w openLabel:'My Workspace'&lt;br /&gt;
w inspect&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we can inspect all the methods available to the instance 'w'.&lt;br /&gt;
&lt;br /&gt;
===Java===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.lang.reflect.*;&lt;br /&gt;
public class Fclass{&lt;br /&gt;
  public static void main(String[] args){&lt;br /&gt;
  Class cls = java.lang.Integer.class;&lt;br /&gt;
  String info;&lt;br /&gt;
  info = cls.getName(); // It will show java.lang.Integer&lt;br /&gt;
  System.out.println(info);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
cls.getName() gives the complete class name which is printed out as the output of the above code is &amp;quot;java.lang.Integer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===PHP===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$reflector = new ReflectionClass(&amp;quot;SimpleXMLElement&amp;quot;); &lt;br /&gt;
echo $reflector;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output of this example is the complete class map of the class SimpleXMLElement.&lt;br /&gt;
&lt;br /&gt;
==Dynamic binding : Making reflection possible==&lt;br /&gt;
&lt;br /&gt;
Ruby implements dynamic binding of objects. Dynamic binding plays a very important role in metaprogramming.&lt;br /&gt;
&lt;br /&gt;
In languages like C,C++; a simple assignment &amp;quot;a = b&amp;quot;, would require 'a' and 'b' to be of the same type. The assignment is interpreted as copying b into a and is implemented by copying the contents of b into the space occupied by a. Thus if 'a' had been declared as an object whose memory size is less than b's object, then object slicing takes place i.e. only that part of 'b' which fits into a's memory would be copied. This behavior might lead to unintended consequences.&lt;br /&gt;
&lt;br /&gt;
But dynamic binding in Ruby ensures that the type of object stored in a variable is determined at run time and not at compile time. Thus the assignment &amp;quot;a = b&amp;quot; is interpreted as binding 'a' to the same object that 'b' is bound to. It is implemented by copying the reference stored in b into the (pointer-sized) memory cell of 'a'. Thus 'a' and 'b' point to the same object after the assignment.&lt;br /&gt;
&lt;br /&gt;
==Symbols and their usage in reflection techniques==&lt;br /&gt;
&lt;br /&gt;
===Basics===&lt;br /&gt;
Symbols are objects used to represent names and strings inside a Ruby interpreter. They are immutable and remain unique i.e. every instance of a particular symbol is the same symbol.&lt;br /&gt;
&lt;br /&gt;
===Usage in reflection techniques===&lt;br /&gt;
Symbols are widely used in reflection to invoke methods dynamically. Reflection methods like 'respond_to', 'send' make use of symbols as a reference to other methods. Strings can also be used in place of symbols. However symbols are more efficient compared to strings in terms of memory and performance.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
====Passing method by reference using a symbol====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Float&lt;br /&gt;
  def poly&lt;br /&gt;
    self*self*self + 2*self*self + 3*self + 4&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And we can pass poly to an integration routine:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
area = integrate(:poly, 0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Symbols in reflection====&lt;br /&gt;
Send method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
irb(main):015:0&amp;gt; to = [:to_s , :to_f]&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
irb(main):016:0&amp;gt; to.each{|method| puts &amp;quot;#{method} =&amp;gt; #{5.send method}&amp;quot;}&lt;br /&gt;
to_s =&amp;gt; 5&lt;br /&gt;
to_f =&amp;gt; 5.0&lt;br /&gt;
=&amp;gt; [:to_s, :to_f]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
respond_to method&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
5.respond_to? :slice #=&amp;gt; false&lt;br /&gt;
5.respond_to? :to_f #=&amp;gt; true&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==method_missing==&lt;br /&gt;
&lt;br /&gt;
Whenever a call to a method is made on an object , Ruby does a method look up. If the method is not found, Ruby calls a method named 'method_missing'. Ruby knows the existence of the 'method_missing' as all objects are instances of 'BasicObject' which includes 'method_missing'. The default behavior of BasicObject#method_missing is to respond by raising a NoMethodError.&lt;br /&gt;
&lt;br /&gt;
Overriding 'method_missing' allows users to call methods that don't really exist. The example below illustrates overriding of 'method_missing' to the programmer's advantage. Ruby passes as parameters the name of the method called and the arguments passed to it.&lt;br /&gt;
&lt;br /&gt;
===Example1===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Cat&lt;br /&gt;
  def mew&lt;br /&gt;
    puts &amp;quot;Meow&amp;quot;&lt;br /&gt;
  end  &lt;br /&gt;
  def method_missing(meth, *args)&lt;br /&gt;
    puts &amp;quot;Sorry, I do not #{meth}&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
c = Cat.new&lt;br /&gt;
c.mew&lt;br /&gt;
&amp;gt;&amp;gt;Meow&lt;br /&gt;
c.bark&lt;br /&gt;
&amp;gt;&amp;gt; Sorry, I do not bark &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, as the method 'bark' does not exist, method_missing is called with the meth (method name as a symbol) :bark. Hence the result &amp;quot; Sorry, I do not bark &amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Example2===&lt;br /&gt;
Using method_missing to convert Roman numerals to integers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Roman &lt;br /&gt;
&lt;br /&gt;
  DIGITS = {&lt;br /&gt;
    'I' =&amp;gt; 1,&lt;br /&gt;
    'V' =&amp;gt; 5,&lt;br /&gt;
    'X' =&amp;gt; 10,&lt;br /&gt;
    'L' =&amp;gt; 50,&lt;br /&gt;
    'C' =&amp;gt; 100,&lt;br /&gt;
    'D' =&amp;gt; 500,&lt;br /&gt;
    'M' =&amp;gt; 1000,&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  def roman_to_integer(roman_string)&lt;br /&gt;
    last = nil&lt;br /&gt;
    roman_string.to_s.upcase.split(//).reverse.inject(0) do |memo, digit|&lt;br /&gt;
      if digit_value = DIGITS[digit]&lt;br /&gt;
        if last &amp;amp;&amp;amp; last &amp;gt; digit_value&lt;br /&gt;
          memo -= digit_value&lt;br /&gt;
        else&lt;br /&gt;
          memo += digit_value&lt;br /&gt;
        end&lt;br /&gt;
        last = digit_value&lt;br /&gt;
      end&lt;br /&gt;
      memo&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  def method_missing(method)        &lt;br /&gt;
    str = method.id2name &lt;br /&gt;
    roman_to_integer(str)      &lt;br /&gt;
  end    &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Evaluating Roman.xix calls the xix method of module Roman. Roman has no xix method, so 	method_missing is invoked with :xix as the argument.The id2name method of class Symbol is invoked on xix returning &amp;quot;xix&amp;quot;. The &amp;quot;xix&amp;quot; is then parsed according to the rules for evaluating Roman numerals, and evaluates to 19.&lt;br /&gt;
&lt;br /&gt;
==Applications of Reflection==&lt;br /&gt;
*Reflection has become invaluable to programmers who need to connect code with data. For example in a GUI environment a button might need to invoke different methods in different classes. Reflection can be used here to call the method on any given class. &lt;br /&gt;
&lt;br /&gt;
*Programmers who deal with a multitude of classes at the same time can use reflection to create a “serializer” that for a given class uses reflection to go through all the instance variables and processes them accordingly.&lt;br /&gt;
&lt;br /&gt;
*Reflection is used in large test frameworks where reflection helps in identifying the test methods for different scenarios.&lt;br /&gt;
&lt;br /&gt;
*Reflection provides the ability to morph the code based on dynamic situations. This provides a sense of artificial intelligence to the program as whole.&lt;br /&gt;
&lt;br /&gt;
*Reflection can be used to debug and verify code as it provides access to the insides of a program.&lt;br /&gt;
&lt;br /&gt;
*Reflection is very useful when the software is upgraded regularly. It provides an easy method to check for available methods and classes. This prevents the errors caused by the absense of methods and classes when they are deprecated.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of reflection==&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
* Extensibility: Reflection provides the capability of using external and user defined classes by instantiation of extensibility objects using their fully qualified names.&lt;br /&gt;
* Class browsers in IDEs: The ability to examine the members of classes makes implementation of visual aids , auto-completion and documentation easy in development tools for programmers.&lt;br /&gt;
* Debugging: Reflection allows the user to observe the private members in classes. This capability can be used to debug classes and their interactions.&lt;br /&gt;
* Test Harness : Reflection can be used to call a set of testing APIs defined on a class for maximum coverage of testing.&lt;br /&gt;
* Correctness : Reflection improves the robustness and the correctness of a program  especially in dynamically typed languages as runtime checks can be added to check the availability of the methods or classes.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
* Reflection introduces lot of performance overhead when compared to non-reflective code. Hence it should be used judiciously.&lt;br /&gt;
* Since it provides access to the internals of a class or an encapsulated object security becomes a major issue.&lt;br /&gt;
* Since it is run-time binding we lose the security of compile time checks and verification.&lt;br /&gt;
&lt;br /&gt;
==Additional Reading==&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51029</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51029"/>
		<updated>2011-09-26T00:38:24Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* ClearCase Version Management System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase: =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample Workflow involving Clearcase ==&lt;br /&gt;
&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkview -tag atag  storage-location &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool co -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool ci -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view:&lt;br /&gt;
&amp;lt;pre&amp;gt;ct pwv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: &lt;br /&gt;
&amp;lt;pre&amp;gt;ct catcs /edcs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmview &amp;lt;view_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is cumbersome.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
Hence Version Control systems have to be chosen based on the requirements of the project and its team.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51027</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51027"/>
		<updated>2011-09-26T00:34:29Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Sample Workflow involving Clearcase */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample Workflow involving Clearcase ==&lt;br /&gt;
&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkview -tag atag  storage-location &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool co -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool ci -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view:&lt;br /&gt;
&amp;lt;pre&amp;gt;ct pwv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: &lt;br /&gt;
&amp;lt;pre&amp;gt;ct catcs /edcs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmview &amp;lt;view_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is cumbersome.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
Hence Version Control systems have to be chosen based on the requirements of the project and its team.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51024</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51024"/>
		<updated>2011-09-26T00:33:06Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Choice of Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkview -tag atag  storage-location &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool co -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool ci -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view:&lt;br /&gt;
&amp;lt;pre&amp;gt;ct pwv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: &lt;br /&gt;
&amp;lt;pre&amp;gt;ct catcs /edcs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmview &amp;lt;view_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is cumbersome.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
Hence Version Control systems have to be chosen based on the requirements of the project and its team.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51021</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51021"/>
		<updated>2011-09-26T00:31:09Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Sample Workflow involving Clearcase */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkview -tag atag  storage-location &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool co -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool ci -nc &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view:&lt;br /&gt;
&amp;lt;pre&amp;gt;ct pwv&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: &lt;br /&gt;
&amp;lt;pre&amp;gt;ct catcs /edcs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmelem &amp;lt;file_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: &lt;br /&gt;
&amp;lt;pre&amp;gt;cleartool rmview &amp;lt;view_name&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is annoying.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
Hence Version Control systems have to be chosen based on the requirements of the project and its team.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51015</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51015"/>
		<updated>2011-09-26T00:26:38Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Choice of Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: cleartool mkview -tag atag  storage-location &lt;br /&gt;
&lt;br /&gt;
Command to create a new file: cleartool mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: cleartool co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: cleartool ci -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view: ct pwv&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: ct catcs /edcs&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: cleartool rmelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: cleartool rmview &amp;lt;view_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is annoying.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
Hence Version Control systems have to be chosen based on the requirements of the project and its team.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51013</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51013"/>
		<updated>2011-09-26T00:25:14Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: cleartool mkview -tag atag  storage-location &lt;br /&gt;
&lt;br /&gt;
Command to create a new file: cleartool mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: cleartool co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: cleartool ci -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view: ct pwv&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: ct catcs /edcs&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: cleartool rmelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: cleartool rmview &amp;lt;view_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control ==&lt;br /&gt;
The choice of version control systems depends on the developers and the projects. Teams use CVS because they are already used to it and have found ways to overcome its limitation. The project would continue to deploy CVS if the prospect of migrating to another revision control is annoying.SVN is more commonly used in the corporate world which believes that a single server technology would ease the transitions related to the project.Also, since SVN is highly matured, any help is readily available for the users.Distributed Systems like Git is more preferred for a open source project where several programmers work at different times and provide several updates to the code.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51000</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=51000"/>
		<updated>2011-09-26T00:14:25Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems from a developer's point of view.It further extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&amp;lt;ref&amp;gt;http://www.ibm.com/developerworks/rational/library/836.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: cleartool mkview -tag atag  storage-location &lt;br /&gt;
&lt;br /&gt;
Command to create a new file: cleartool mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: cleartool co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: cleartool ci -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view: ct pwv&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: ct catcs /edcs&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: cleartool rmelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: cleartool rmview &amp;lt;view_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50998</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50998"/>
		<updated>2011-09-26T00:13:39Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems.It extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: cleartool mkview -tag atag  storage-location &lt;br /&gt;
&lt;br /&gt;
Command to create a new file: cleartool mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: cleartool co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: cleartool ci -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view: ct pwv&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: ct catcs /edcs&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: cleartool rmelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: cleartool rmview &amp;lt;view_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50996</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50996"/>
		<updated>2011-09-26T00:13:07Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Choice of Version Control Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
The article compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems.It extends the comparison to popular version control applications like RCS, SVN, CVS, Clearcase, Mercurial and Git.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
Command to create a new view: cleartool mkview -tag atag  storage-location &lt;br /&gt;
&lt;br /&gt;
Command to create a new file: cleartool mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to create a new branch: cleartool mkbranch -nc &amp;lt;version_selector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to checkout a file for editing: cleartool co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check in a file after editing: cleartool ci -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to check the current working view: ct pwv&lt;br /&gt;
&lt;br /&gt;
Command to view/edit the current config spec for the view: ct catcs /edcs&lt;br /&gt;
&lt;br /&gt;
Command to merge and deliver the code changes: cleartool merge -to target-path -insert contributor-version-selector &amp;lt;name_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a file: cleartool rmelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to delete a view: cleartool rmview &amp;lt;view_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50989</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50989"/>
		<updated>2011-09-26T00:06:39Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
There are a number of solutions which are available for programmers.Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50979</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50979"/>
		<updated>2011-09-25T23:49:35Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50978</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50978"/>
		<updated>2011-09-25T23:49:19Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control|DVCS]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50976</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50976"/>
		<updated>2011-09-25T23:48:54Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control|CVS]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control|DVCS]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50975</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50975"/>
		<updated>2011-09-25T23:48:36Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control|[[&amp;quot;CVS&amp;quot;]]]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control|DVCS]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50969</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50969"/>
		<updated>2011-09-25T23:43:01Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control|[[&amp;quot;CVS&amp;quot;]]]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50968</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50968"/>
		<updated>2011-09-25T23:42:30Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Summary of Centralized versus Distributed Approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50967</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50967"/>
		<updated>2011-09-25T23:42:20Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50966</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50966"/>
		<updated>2011-09-25T23:41:34Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines If version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50965</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50965"/>
		<updated>2011-09-25T23:41:17Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
===== ClearCase Version Management System =====&lt;br /&gt;
&lt;br /&gt;
ClearCase is a comprehensive software configuration management system. It is used to manage multiple versions of evolving software systems, tracks which versions were used in software builds, used to perform builds of individual programs or complete releases according to user-defined version and system specifications.&lt;br /&gt;
&lt;br /&gt;
These capabilities enable ClearCase to address the issues and critical requirements of organizations that develop software:&lt;br /&gt;
&lt;br /&gt;
Effective development — ClearCase enables users to work efficiently, allowing them to fine-tune the balance between sharing each other's work and isolating themselves from destabilizing changes done. ClearCase automatically manages the sharing of both source files and the files produced by software builds.&lt;br /&gt;
&lt;br /&gt;
Effective management — ClearCase tracks the software build process, so that users can determine what was built, and how it was built. Further, ClearCase can instantly recreate the source base from which a software system was built, allowing it to be rebuilt, debugged, and updated — all without interfering with other programming work.&lt;br /&gt;
&lt;br /&gt;
Enforcement of development policies — ClearCase enables project administrators to define development policies and procedures, and to automate their enforcement.&lt;br /&gt;
&lt;br /&gt;
More information about ClearCase can be found at [http://www-01.ibm.com/software/awdtools/clearcase/ ClearCase]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
* [http://changelog.complete.org/archives/698-if-version-control-systems-were-airlines if version control systems were airlines]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50957</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50957"/>
		<updated>2011-09-25T23:33:51Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50954</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50954"/>
		<updated>2011-09-25T23:33:21Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/ Choosing a Version Control System]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50949</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50949"/>
		<updated>2011-09-25T23:32:22Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view:''' ct mkview -tag &amp;lt;view_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new file:'''ct mkelem &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: '''ct co -nc &amp;lt;file_name&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Sample command to check in a file:''' ct ci -nc &amp;lt;file_name&amp;gt;'''  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://www.szakmeister.net/blog/2011/feb/17/choosing-new-version-control-system/] Choosing a Version Control System&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50945</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50945"/>
		<updated>2011-09-25T23:29:56Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to create a new view: ct mkview -tag &amp;lt;view_name&amp;gt;&lt;br /&gt;
Sample command to create a new file: ct mkelem &amp;lt;file_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
Sample command to check out a file: ct co -nc &amp;lt;file_name&amp;gt;&lt;br /&gt;
Sample command to check in a file: ct ci -nc &amp;lt;file_name&amp;gt;  (when you are working in the same branch where the file is checked out).&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
* [http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50908</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50908"/>
		<updated>2011-09-25T23:08:40Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
[http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50907</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50907"/>
		<updated>2011-09-25T23:08:26Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
[http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50905</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50905"/>
		<updated>2011-09-25T23:07:58Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
[http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50904</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50904"/>
		<updated>2011-09-25T23:07:44Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
[[Image:RCS.png|thumb|150px|alt=Local Version Control]]&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Centralized Version Control]]&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
[http://excess.org/article/2008/07/ogre-git-tutorial/ A Video presentation on &amp;quot;Git, The Basics&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvals on Git]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:RCS.png&amp;diff=50900</id>
		<title>File:RCS.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:RCS.png&amp;diff=50900"/>
		<updated>2011-09-25T23:06:25Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: Local File Server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Local File Server&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50892</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50892"/>
		<updated>2011-09-25T23:00:46Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;br /&gt;
* [http://schacon.github.com/git/gittutorial.html Git Tutorial]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50882</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50882"/>
		<updated>2011-09-25T22:57:36Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Distributed Version Control.|[''Centralized Version Control'']]]&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control.|[''Distributed Version Control'']]]&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50880</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50880"/>
		<updated>2011-09-25T22:57:20Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Centralized Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
[[Image:CVS.png|thumb|150px|alt=Distributed Version Control.|[''Centralized Version Control'']]]&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_join_ucm_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_views_intro.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_file_ci_co.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_deliver_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by different teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/topic/com.ibm.rational.clearcase.tutorial.doc/a_merge_wrk.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50876</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50876"/>
		<updated>2011-09-25T22:56:24Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
[[Image:File-DVCS.png|thumb|150px|alt=Distributed Version Control.|[''Distributed Version Control'']]]&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found   [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Checking in files and checking out files''': Checking files in and out are two basic operations you will perform on a regular basis by a developer. Whenever the developer needs to edit a file, he has to checkout the file. And after completion of coding, he needs to check in the file. More information about the process can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Delivering your work''': After testing your work in your private workspace, and you are sure that your work is error-free, you are ready to submit your work to the integration stream so that other project members can use the latest version of your work. More information about the procedure of delivering code can be found  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
'''Merging your work''': After completion, the development branch must be merged to integration branch where software developed by ddifferent teams are merged and tested for seamless operation. More information about this procedure can be obtained [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm here]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;br /&gt;
* [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm IBM Software Information Center]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CVS.png&amp;diff=50874</id>
		<title>File:CVS.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CVS.png&amp;diff=50874"/>
		<updated>2011-09-25T22:56:08Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: Centralized Version Control System&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Centralized Version Control System&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50858</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50858"/>
		<updated>2011-09-25T22:49:07Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
[[Image:File-DVCS.png|thumb|200px|alt=Distributed Version Control.|[''Distributed Version Control'']]]&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found here * [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [[here]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:File-DVCS.png&amp;diff=50852</id>
		<title>File:File-DVCS.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:File-DVCS.png&amp;diff=50852"/>
		<updated>2011-09-25T22:48:02Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: uploaded a new version of &amp;amp;quot;File:File-DVCS.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50826</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50826"/>
		<updated>2011-09-25T22:43:23Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Local Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only.&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Revision_Control_System&amp;lt;/ref&amp;gt; It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
This section provides an example of a sample workflow used by a programmer to maintain the code in Clearcase.&lt;br /&gt;
&lt;br /&gt;
'''Joining a UCM Project''': After project managers have established the UCM project environment, developers can then set up their work areas.&lt;br /&gt;
This is accomplished by joining the UCM project. More information about this can be found here[  [http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.tutorial.doc/a_wflow_cc_proj.htm]&lt;br /&gt;
&lt;br /&gt;
'''Working with views''': A view is the mechanism Rational ClearCase uses to provide access to specific versions of elements or specific parts of &lt;br /&gt;
code under source control. Rules are the basis to determine which version of each element is visible and accessible through the view for a developer. More information about views can be found [[here]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50784</id>
		<title>CSC/ECE 517 Fall 2011/ch1 1f rs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch1_1f_rs&amp;diff=50784"/>
		<updated>2011-09-25T22:31:43Z</updated>

		<summary type="html">&lt;p&gt;Rgowda: /* Mercurial: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Comparison of Version Control Systems : The Programmer View'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Version control also called Sub-Version Control or Revision Control is indispensable in large projects. They make sure that projects are not spinning out of control by letting different programmers work on the project from a different perspective without getting in each other’s way and without doing any damage that cannot be undone.&lt;br /&gt;
&lt;br /&gt;
Some of the most popular version control systems are RCS, SVN, CVS, Mercurial and Git. This article intends to compare these version control systems in a programmer’s viewpoint.&lt;br /&gt;
&lt;br /&gt;
== Choice of Version Control Systems ==&lt;br /&gt;
There are a number of solutions which are available for programmers. We have put together a definitive feature comparison for reference on deciding about the best choice for a project.&lt;br /&gt;
&lt;br /&gt;
The main difference between Version Control Systems is whether they are Client-Server based or peer-to-peer based.  Either they have a centralized repository where code is checked out, edited and checked in with changes, or a setup where the code is frequently updated from different peer sources, a more decentralized network to keep your code updated with changes.&lt;br /&gt;
&lt;br /&gt;
The article further compares all the Version Control Systems like RCS, CVS and Distributed Version Control Systems. Also, the article compares multiple Version Control applications like Mercurial, Git, Clearcase and CVS. Comparison is done in the view of programmer. Various commands used in different applications are discussed.&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Systems==&lt;br /&gt;
==== Local Version Control ====&lt;br /&gt;
This is a primitive approach of version control. The system operates on single files only. It has no way of working with an entire project. Changes to a file are stored as 'deltas' with the aid of a diff utility. Since the approach maintain many copies of files, it is generally cumbersome with reduced efficiency.&lt;br /&gt;
&lt;br /&gt;
==== Centralized Version Control ====&lt;br /&gt;
CVS implements a Client-Server model to achieve version control. A central repository is maintained which is used by all the developers of a project. Programmers can only have a working copy of the project. The model allows a developer to checkout only the required files or branches. In this model all operations on the code (commit, exchange of code etc.)  involve communication with the central server via a network. This means that these operations are not available when the user is offline. Also  issues in communication with the server may disrupt the development activity.&lt;br /&gt;
Any changes to the project on the server involves an authentication process. Hence only users with certain privileges can commit code on the central server . A developer can checkpoint or create branches on his work only by committing his changes to the central repository.  Since all the developers commit changes on the same repository, it is generally challenging to resolve conflicts when merging or reconciling changes from other branches.&lt;br /&gt;
&lt;br /&gt;
==== Distributed Version Control ====&lt;br /&gt;
This system implements a peer to peer model to achieve version control. No reference copy of the codebase exist by default. However in practice, an official reference copy is indeed maintained. The model  requires the developers to possess a full blown backup of the repository , including the entire history. As a result, the developers can collaborate directly without the need of a central authority. Hence it allows developers to be productive even when offline. (e.g. when travelling). Also the overhead of communicating with a central repository is overcome in this approach.&lt;br /&gt;
Branching and merging fit much better in this approach as each user has his own branch. The administrator's major work is to merge appropriate changes from branches of different users. This is relatively simpler compared to  the centralized system. As a result, the distributed system scales much better with the number of people.&lt;br /&gt;
&lt;br /&gt;
==== Summary of Centralized versus Distributed Approach ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: 100%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Centralized Version Control&lt;br /&gt;
! Distributed Version Control&lt;br /&gt;
|-&lt;br /&gt;
| Client - server model&lt;br /&gt;
| peer- to -peer model&lt;br /&gt;
|-&lt;br /&gt;
| Single central repository.&lt;br /&gt;
| Multiple repositories&lt;br /&gt;
|-&lt;br /&gt;
| Changes can be committed only Online&lt;br /&gt;
| Changes can be committed offline&lt;br /&gt;
|-&lt;br /&gt;
| Allows developer to checkout required files/branches.&lt;br /&gt;
| Complete repository has to be downloaded by the programmer &lt;br /&gt;
|-&lt;br /&gt;
| Merging and Branching operations are complicated as&lt;br /&gt;
multiple programmers work on the same repository at the same time.&lt;br /&gt;
| Branching is simple as each programmer gets a branch&lt;br /&gt;
|-&lt;br /&gt;
| Repository maintenance becomes more challenging with number of people&lt;br /&gt;
| Scales better with number of people&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Comparison of Version Control Applications ==&lt;br /&gt;
==== Overview of Version Control Applications ====&lt;br /&gt;
&lt;br /&gt;
=====  RCS: The Revision Control System (RCS)=====&lt;br /&gt;
&lt;br /&gt;
RCS manages multiple revisions of files. RCS operates on a set of files. RCS automates the process of storing, retrieval, logging, identification, and merging of multiple revisions. It is useful for text that is modified frequently which includes source code, programs, documentation, graphics, papers, and letters. This is the most basic and most primitive Version Control System known to programmers.&lt;br /&gt;
&lt;br /&gt;
More information about RCS can be found at [http://www.gnu.org/s/rcs/ RCS]&lt;br /&gt;
&lt;br /&gt;
=====  CVS: The Concurrent Versions System (CVS)=====&lt;br /&gt;
&lt;br /&gt;
CVS is a Client-Server software revision control system in the field of software development. Version control software keeps track of all the changes in a set of files, and makes sure that several developers (potentially widely separated in space and/or time) can collaborate in real time. The CVS server runs on Unix-like systems with client software that runs on different operating systems on multiple client machines. It is regarded as the most mature version control system because it has been developed for such a long time and has stood the test of time. A fork project of CVS, CVSNT was created to run CVS on Windows servers, and it is currently being actively developed to increase functionality and make it more usable on Windows platform.&lt;br /&gt;
&lt;br /&gt;
More information about CVS can be found at [http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
&lt;br /&gt;
=====  SVN: Sub Version (SVN)=====&lt;br /&gt;
&lt;br /&gt;
SVN was created as an alternative to CVS that would be useful to fix some known issues in CVS and also maintaining high compatibility with it. SVN is free and open source with the difference of being distributed under the Apache license as opposed to GNU which distributes licenses for CVS. To prevent the database from being corrupted, SVN adopts a technique called 'Atomic Operations'. Either all of the modifications made to the source are committed or none are committed. Partial changes will not enter the original source. Many developers have switched to SVN as it is a newer technology that starts with the best features of CVS and improves upon them. While branch operations in CVS are expensive and do not really lend themselves to long-term forks in the project, SVN is designed to allow for it. Hence it lends itself better to large forked projects with many directions. Some known disadvantages of SVN includes slower operation speeds and the lack of distributed revision control. Distributed revision control uses a peer-to-peer model as compared to using a centralized server to store code modifications. Peer-to-peer model work better for open source projects which are spread over multiple far away physical locations. The downside to a dedicated server approach is the issue of not having redundancy in the case when the server is down leading to no access to clients.&lt;br /&gt;
&lt;br /&gt;
More information about SVN can be found at [http://subversion.apache.org/ SVN]&lt;br /&gt;
&lt;br /&gt;
=====  Git:=====&lt;br /&gt;
&lt;br /&gt;
Git takes a totally diverse approach that differs greatly in comparison to CVS and SVN. The original concepts for Git were to make a faster, distributed version control system that would openly invalidate conventions and practices used in CVS. It is primarily developed for Linux and has the highest speeds on there. It will also run on other Unix-like systems, and Windows agents are known as msysgit. As there is no centralized server, Git is not very suitable for single developer projects or small teams as the code may not necessarily be available when using a normal computer. Workarounds exist for this problem. Developers look out for Git’s improved speed as a decent trade off for the hassle.&lt;br /&gt;
&lt;br /&gt;
More information about Git can be found at [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
=====  Mercurial:===== &lt;br /&gt;
&lt;br /&gt;
Mercurial is a distributed revision control tool which began close to the same time as Git. Mercurial was originally made to compete with Git for Linux kernel development. Mercurial is primarily implemented in Python as opposed to C, but there are some instances where C is used. This is a major difference compared to other version control systems in Developer's point of view. Users feel that Mercurial is similar to SVN with respect to certain features, as well as being a distributed system. This acts as an advantage for the tool as the learning curve for those already familiar with SVN will be less steep. The documentation for Mercurial is very well compiled and facilitates understanding the differences faster. One of the major drawback to Mercurial is that it does not allow for two parents to be merged. Unlike Git, it uses an extension system rather than using scripts. That may be ideal for some section of programmers, but many find the speed of operation of Git to be a feature they do not want to trade off for anything.&lt;br /&gt;
&lt;br /&gt;
More information about Mercurial can be found at [http://mercurial.selenic.com Mercurial]&lt;br /&gt;
&lt;br /&gt;
==== Basic Features ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Repository model|Repository model&lt;br /&gt;
! #Concurrency model|Concurrency model&lt;br /&gt;
! #Programming Languages|Programming Languages&lt;br /&gt;
! #Scope of Change|Scope of Change&lt;br /&gt;
! #Atomic commits|Atomic commits&lt;br /&gt;
! #File Renames|File Renames&lt;br /&gt;
! #Interactive Commits|Interactive Commits&lt;br /&gt;
! #Partial Checkout/clone|Partial Checkout/clone&lt;br /&gt;
! Platforms supported&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Set of files	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C &lt;br /&gt;
|  File &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Clear Case	&lt;br /&gt;
| Client-Server	&lt;br /&gt;
| Merge or Lock&lt;br /&gt;
|  C, Java, Perl &lt;br /&gt;
|  File &lt;br /&gt;
|  Partial&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
|  Yes &lt;br /&gt;
| Linux, Windows, AIX, Solaris, HP UX, i5/OS, OS/390, z/OS&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  C,Perl &lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Partial &lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| POSIX, Windows, Mac OS X&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Distributed	&lt;br /&gt;
| Merge&lt;br /&gt;
|  Python, C&lt;br /&gt;
|  Tree &lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes&lt;br /&gt;
|  Yes &lt;br /&gt;
|  No &lt;br /&gt;
| Unix-like, Microsoft Windows|Windows, Mac OS X	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Feature Description&lt;br /&gt;
|-&lt;br /&gt;
! Repository Model&lt;br /&gt;
| Describes the relationship between various copies of the source code repository.&lt;br /&gt;
|-&lt;br /&gt;
! Concurrency Model&lt;br /&gt;
| Describes how changes to the working copy are managed to prevent simultaneous edits from causing nonsensical data in the repository.&lt;br /&gt;
|-&lt;br /&gt;
! Programming Languages&lt;br /&gt;
| The coding language in which the application is being developed&lt;br /&gt;
|-&lt;br /&gt;
! Scope of Change&lt;br /&gt;
| Describes whether changes are recorded for individual files or for entire directory trees.&lt;br /&gt;
|-&lt;br /&gt;
! Atomic commits&lt;br /&gt;
| Refers to a guarantee that all changes made are merged, or that no change at all will be made.&lt;br /&gt;
|-&lt;br /&gt;
! File Renames&lt;br /&gt;
| Describes whether a system allows files to be renamed while retaining their version history.&lt;br /&gt;
|-&lt;br /&gt;
! Interactive Commits&lt;br /&gt;
| Interactive commits allow the user to cherrypick the patch-hunks that become part of a commit, instead of having only a file-level granularity.&lt;br /&gt;
|-&lt;br /&gt;
! Partial Checkout/clone&lt;br /&gt;
| Ability to check out or clone only a specified subdirectory from a repository.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Basic Commands ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Software&lt;br /&gt;
! #Clone|Clone&lt;br /&gt;
! #Pull|Pull&lt;br /&gt;
! #Push|Push&lt;br /&gt;
! #Checkout|Checkout&lt;br /&gt;
! #Add|Add&lt;br /&gt;
! #Remove|Remove&lt;br /&gt;
! #Merge|Merge&lt;br /&gt;
! #Commit|Commit&lt;br /&gt;
! #Revert|Revert&lt;br /&gt;
! #Rebase|Rebase&lt;br /&gt;
|-&lt;br /&gt;
! RCS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  co &lt;br /&gt;
| Not Supported&lt;br /&gt;
| rcsclean&lt;br /&gt;
| rcsmerge&lt;br /&gt;
|  ci&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! CVS	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| update -j&lt;br /&gt;
|  commit&lt;br /&gt;
| rm, update&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! SVN	&lt;br /&gt;
| svnadmin hotcopy	&lt;br /&gt;
| svnadmin load&lt;br /&gt;
| svnadmin dump&lt;br /&gt;
|  checkout &lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
|  commit&lt;br /&gt;
| revert&lt;br /&gt;
| Not Supported&lt;br /&gt;
|-&lt;br /&gt;
! Clearcase	&lt;br /&gt;
| Not Supported	&lt;br /&gt;
| Not Supported&lt;br /&gt;
| Not Supported&lt;br /&gt;
|  checkout &lt;br /&gt;
| mkelem&lt;br /&gt;
| rmelem&lt;br /&gt;
| merge&lt;br /&gt;
| checkin&lt;br /&gt;
| unco/rmver&lt;br /&gt;
| findmerge&lt;br /&gt;
|-&lt;br /&gt;
! Git	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Fetch&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| checkout&lt;br /&gt;
| rebase&lt;br /&gt;
|-&lt;br /&gt;
! Mercurial	&lt;br /&gt;
| Clone	&lt;br /&gt;
| Pull&lt;br /&gt;
| Push&lt;br /&gt;
| Clone&lt;br /&gt;
| add&lt;br /&gt;
| rm&lt;br /&gt;
| merge&lt;br /&gt;
| commit&lt;br /&gt;
| revert&lt;br /&gt;
| rebase&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: left; width: auto;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Command Description&lt;br /&gt;
|-&lt;br /&gt;
! Clone&lt;br /&gt;
| Create an identical instance of a repository&lt;br /&gt;
|-&lt;br /&gt;
! Pull&lt;br /&gt;
| Download revisions from a remote repository to a local repository&lt;br /&gt;
|-&lt;br /&gt;
! Push&lt;br /&gt;
| Upload revisions from a local repository to a remote repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Create a local working copy from a (remote) repository&lt;br /&gt;
|-&lt;br /&gt;
! Add an element&lt;br /&gt;
| Mark specified files to be added to repository at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Remove an element&lt;br /&gt;
| Mark specified files to be removed at next commit&lt;br /&gt;
|-&lt;br /&gt;
! Merge&lt;br /&gt;
| Apply the differences between two sources to a working copy path&lt;br /&gt;
|-&lt;br /&gt;
! Commit&lt;br /&gt;
| Record changes in the repository&lt;br /&gt;
|-&lt;br /&gt;
! Checkout&lt;br /&gt;
| Restore working copy file from repository&lt;br /&gt;
|-&lt;br /&gt;
! Rebase&lt;br /&gt;
| Forward-port local commits to the updated upstream head&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Sample Workflow involving Clearcase ====&lt;br /&gt;
------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
[http://pg-server.csc.ncsu.edu/mediawiki/index.php/CSC/ECE_517_Fall_2010/ch1_1a_br Information about Version Control Systems]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://code.google.com/p/support/wiki/DVCSAnalysis Comparison between Git and Mercurial] by Google (summer 2008)&lt;br /&gt;
* [http://www.softeng.rl.ac.uk/media/uploads/publications/2010/03/cvs-svn.pdf Comparison of CVS and Subversion]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software Revision Control Systems Comparison]&lt;/div&gt;</summary>
		<author><name>Rgowda</name></author>
	</entry>
</feed>