What are the advantages of using SVN over CVS?
Asked Answered
R

12

66

My company is using CVS as our de-facto standard for source control. However, I've heard a lot of people say that SVN is better.

I know SVN is newer, but other than that, I'm unfamiliar with its benefits.

What I'm looking for is a good, succinct comparison of the two systems, noting any advantages or disadvantages of each in a Java/Eclipse development environment.

Repay answered 4/8, 2008 at 14:6 Comment(0)
A
68

CVS only tracks modification on a file-by-file basis, while SVN tracks a whole commit as a new revision, which means that it is easier to follow the history of your project. Add the fact that all modern source control software use the concept of revision so it is far easier to migrate from SVN than it is from CVS.

There is also the atomic commit problem. While I only encountered it once, it is possible that 2 people committing together in CVS can conflict each other, losing some data and putting your client in an inconsistent state. When detected early, these problems are not major because your data is still out there somewhere, but it can be a pain in a stressful environment.

And finally, not many tools are developed around CVS anymore. While the new and shiny-new tools like Git or Mercurial definitely lack tools yet, SVN has a pretty large application base on any system.

EDIT 2020: Seriously, this answer is 12 years old now. Forget SVN, go use Git like everyone else!

Alfredalfreda answered 4/8, 2008 at 14:17 Comment(4)
I want the same answer for git vs subversion and git vs mercurialDowndraft
"Forget SVN, go use Git": I don't think that's a matter of old/new or about how many people use it, they are different thingsGearhart
> "Seriously, this answer is 12 years old now. Forget SVN, go use Git like everyone else!" | It is 2022, and the Foundation I work for just switched from Git to CVS. I guess our use-case/workflow is similar to OpenBSD.Ingrowth
The 2020 Edit above is misleading. SVN does have some advantages over git especially working with large repos containing large binary files. In this case, SVN is faster since you only download (and upload) the files you need to modify, not the whole repo. SVN is also easier to master for newbies. See blog.programster.org/advantages-of-svn-over-git But for most software development projects, git is typically the better choice.Alasdair
H
19

One of the many comparisons:

http://wiki.scummvm.org/index.php/CVS_vs_SVN

Now this is very specific to that project, but a lot of stuff apllies in general.

Pro Subversion:

  • Support for versioned renames/moves (impossible with CVS): Fingolfin, Ender
  • Supports directories natively: It's possible to remove them, and they are versioned: Fingolfin, Ender
  • File properties are versioned; no more "executable bit" hell: Fingolfin
  • Overall revision number makes build versioning and regression testing much easier: Ender, Fingolfin
  • Atomic commits: Fingolfin
  • Intuitive (directory-based) branching and tagging: Fingolfin
  • Easier hook scripts (pre/post commit, etc): SumthinWicked (I use it for Doxygen after commits)
  • Prevents accidental committing of conflicted files: Salty-horse, Fingolfin
  • Support for custom 'diff' command: Fingolfin
  • Offline diffs, and they're instant: sev
Houseless answered 4/8, 2008 at 14:9 Comment(2)
What is a "fingolfin" ? Googling that word makes it only more confusingInnes
Fingolfin and Ender are just the Names of People of that Forum: Behind each "argument" is a list of people who agree that this particular argument is valid. Cleromancy
H
15

SVN has 3 main advantages over CVS

  • it's faster
  • supports versioning of binary files
  • and adds transactional commit (all or nothing)
Hocker answered 4/8, 2008 at 14:35 Comment(0)
A
7

The Subversion book has an appendix that details important differences from CVS, which may help you make your decision. The two approaches are more or less the same idea but SVN was specifically designed to fix long standing flaws in CVS so, in theory at least, SVN will always be the better choice.

Aeneous answered 4/8, 2008 at 14:14 Comment(0)
A
4

I'll second Eridius' suggestion of Git, but I'd expand it to the other DRCS (Distributed Revision Control System) such as Mercurial and bazaar.

These products are fairly recent and the level of tooling and integration with them seems low at the moment (based on my initial research). I'd say they were best suited to the power-developers out there (and on here ;-)).

On the other hand, what doesn't CVS currently do for you? From your initial question, you don't really have any, "CVS sucks at this, what could I use instead?"

You've gotta weigh up the costs of any potential migration against the benefits. For an existing project, I think that it would be hard to justify.

Adel answered 18/8, 2008 at 17:4 Comment(0)
M
4

One thing not to overlook is ecosystem. I was working at a CVSNT shop, and I was finding more and more open source tools supported SubVersion by default.

Mcgill answered 18/8, 2008 at 17:22 Comment(0)
D
2

btw: CVSNT supports atomic commits

Disraeli answered 18/8, 2008 at 16:22 Comment(0)
R
2

As someone who is in the middle of switching between CVS and SVN (initially we switched all of our projects with cvs2svn and then decided that we would transition by only using svn on new projects), here are some of the problems we have had.

  • Merging and branching are very different, and if you branch and merge frequently, unless you have SVN 1.5 running on your server have to know when you branched (this isn't very clear in the Tortoise SVN dialogs). Michael says the branching and merging is intuitive, I would argue that after using CVS for 10 years, it is not.
  • If your are running the SVN server on Linux, it may be hard to get your SA to move to svn 1.5, as the default install 1.4.x.
  • Merging conflicts is not nearly as easy or as clear (at least to me and my co-workers) in TortoiseSVN as it is in TortoiseCVS. The three pane approach takes some getting used to and the WinMerge (my preferred merge tool) doesn't do a three pane merge.
  • Beware: many of the online tutorials and magazine articles I have read obviously don't branch and merge, you should set up your main repository as https://svn.yoursvnserver.com/repos/YourProject/Trunk and branches on https://svn.yoursvnserver.com/repos/YourProject/Branches/BranchX . You can clean up if you start your repos in the wrong place, but it leads to confusion.
Radiculitis answered 4/9, 2008 at 17:44 Comment(0)
C
1

You should take a look at Git instead of SVN. It's a DVCS that's blazing-fast and very powerful. It's not as user-friendly as SVN, but it's improving in that regard, and it's not that hard to learn.

Chthonian answered 6/8, 2008 at 23:9 Comment(1)
You, sire, deserve a medal for fortune telling.Minestrone
S
1

CVS (Concurrent Versions System) and SVN (SubVersioN) are two version control file systems that are popularly used by teams who are collaborating on a single project. These systems allow the collaborators to keep track of the changes that are made and know who is developing which and whether a branch should be applied to the main trunk or not. CVS is the much older of the two and it has been the standard collaboration tool for a lot of people. SVN is much newer and it introduces a lot of improvements to address the demands of most people.

Sparry answered 17/7, 2018 at 7:19 Comment(0)
C
0

you might also choose to migrate only the latest code from CVS into SVN and freeze your current CVS repo. this will make migration easier and you might also build your legacy releases in the old CVS repo.

Creole answered 8/10, 2008 at 16:19 Comment(0)
R
0

Well, a few things which i feel makes svn awesome.

  1. The SVN-Altassian crucible combination is a far superior method of reviews and quality checks
  2. Better management of conflicts and merges
  3. It's obviously faster for taking checkouts, performing commits, etc.
  4. The atomic commit problem - It is possible that 2 people committing together in CVS can conflict each other, losing some data and putting your code base in an inconsistent state

Migration can easily be done in a few hours using cvs2svn.

Receptive answered 18/9, 2016 at 14:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.