views:

128

answers:

3

Possible Duplicate:
SVN and revision numbers

Say I have 3 files foo.txt, bar.txt and moo.txt all at revision 1.

Say I commit foo.txt and bar.txt ten times. So they are at revison 1.10. Since in SVN there is a single revision no moo.txt also has to be at revision 1.10. Now if I see the history of moo.txt then, will I see the history of commits from 1 to 10?

The reason I am asking this question is I was telling my friend how sucky CVS is when compared to SVN. He is a big fan of CVS. So he told me since CVS revision numbers are file specific it is very easy for him to bring a single file back to some status (since the history of single file does not contain the commits done to other sections of the project). Since I always update my whole project to a previous version (not single file) I have never come across this situation. So, I want to know how is this handled in SVN?

A: 

This is a duplicate of http://stackoverflow.com/questions/974697/svn-and-revision-numbers

Jonas Kölker
A: 

In subversion, all version numbers are integers (so there is no 1.10 for example), you'd just go 1, 2, 3 and so forth, up to ten in your example. If you were to view the history of a specific file, you would only see the revision history for that particular file:

  1. File moo.txt added
  2. moo.txt changed
  3. moo-txt changed

(very simplified example of the history)

If you were to revert moo.txt back to the point it was at during revision 7 (where no changes were made), it would be at the same state as revisions 6 and 5 (since the file was not changed between these times.

I hope this is of some use, I'm not 100% sure what you were asking. Apologies if I misunderstood.

Splash
A: 

In SVN, revision number as integers (1, 2, 3, ...), not dotted monsters as in CVS (1.1, 1.2, ... and on branch 1.2.1.1, 1.2.1.2, ...)

The big advantage of SVN is that the revision number is global to the repository, so that you CAN revert the whole project to a specific revision, which is NOT possible in CVS.

reverting a single file is still possible, just use svn update with a single file argument.

Ber