Difference between revisions of "CVS and Subversion Differences"

From CS Support Wiki
Jump to: navigation, search
 
Line 1: Line 1:
===Revision Numbers===
+
====Revision Numbers====
 
In CVS, revision numbers are per file. CVS uses RCS (Revision Control System) as a backend, and each file has a corresponding RCS file in the repository. The repository is roughly laid out according to the structure of your project tree.
 
In CVS, revision numbers are per file. CVS uses RCS (Revision Control System) as a backend, and each file has a corresponding RCS file in the repository. The repository is roughly laid out according to the structure of your project tree.
  
Line 5: Line 5:
  
 
In CVS, you may talk about 'revision 4 of source.c.' In Subversion, you would say 'source.c as it appears in revision 4.' In CVS, revisions 3 and 4 of source.c are always different. In Subversion, it's quite likely that source.c was not changed between revisions 3 and 4.
 
In CVS, you may talk about 'revision 4 of source.c.' In Subversion, you would say 'source.c as it appears in revision 4.' In CVS, revisions 3 and 4 of source.c are always different. In Subversion, it's quite likely that source.c was not changed between revisions 3 and 4.
 +
 +
 +
====Commits====
 +
In Subversion, commits are atomic - they happen all at once or not at all. The whole change is applied (or rolled back) and is only visible to other users once completed.
 +
 +
In CVS, a commit alters each file in turn until it is done. This can lead to problems. For instance, if a network connect goes down in the middle of a commit, this can leave the CVS repository partially changed, and often unstable. If a user updates their working copy whilst another is committing a change, they may retrieve a partial commit from the CVS server.

Revision as of 14:47, 8 August 2006

Revision Numbers

In CVS, revision numbers are per file. CVS uses RCS (Revision Control System) as a backend, and each file has a corresponding RCS file in the repository. The repository is roughly laid out according to the structure of your project tree.

In Subversion, the repository looks like a single filesystem. Each commit results in an entirely new filesystem tree, so the repository can be likened to an array of trees. Revision 62 would refer to a particular tree - the way the filesystem looked after the 62nd commit.

In CVS, you may talk about 'revision 4 of source.c.' In Subversion, you would say 'source.c as it appears in revision 4.' In CVS, revisions 3 and 4 of source.c are always different. In Subversion, it's quite likely that source.c was not changed between revisions 3 and 4.


Commits

In Subversion, commits are atomic - they happen all at once or not at all. The whole change is applied (or rolled back) and is only visible to other users once completed.

In CVS, a commit alters each file in turn until it is done. This can lead to problems. For instance, if a network connect goes down in the middle of a commit, this can leave the CVS repository partially changed, and often unstable. If a user updates their working copy whilst another is committing a change, they may retrieve a partial commit from the CVS server.