views:

1518

answers:

11
Git/Mercurial have been becoming more and more popular. I have seen plenty of articles comparing SVN with Git/Mercurial, but I am wondering if there is really any reason to still use SVN. It seems like there are plenty of tools for Git/Mercurial now which should help spread its corporate adoption. Are there any reasons to still use SVN? Is Mercurial/Git finally ready for corporate adoption?
+4  A: 

I don't know of any intrinsic reasons to prefer centralized vcs, there are plenty of extrinsic factors like legacy systems, managerial inertia, learning curve, etc.

DVCS is pretty much demonstrating itself to be the "better mousetrap".

msw
+1 for segregating intrinsic versus extrinsic.
wuputah
+17  A: 

Is it considered better for a single developer?

If anything, Subversion is worse for a single developer (more troublesome to setup).

But a good reason to keep using SVN is inertia. If SVN works fine for your project (or in your company), there is no need to go through the pains of switching over. There might be some training costs involved in teaching everyone the new tools (and new workflows), with no real benefits.

Thilo
i agree with @Thilo. SVN does not have any severe problems calling for a urgent switch. For new projects you can choose git. Otherwise, for three years my comp is using SVN (r8000+) and all is in control. I try to follow "don't fix that is not broken."
thevikas
No offense, Thilo, but that sounds a lot like "it's always been done that way here.." which is never a good reason by itself. I would agree that there are costs and pains to switching, and I also agree that you wouldn't make the change willy-nilly (jump on the bandwagon), but I would also say that you can't necessarily say that you'd have all costs and no real benefits w/o a proper cost-benefit analysis. There *are* real benefits to distributed version control, the real question is are those benefits enough to outweigh the costs?
Paul
@Paul: The most important thing is to keep the history, to keep that “institutional knowledge” about what exactly was released, how you got there, etc. Having *a* version control system (and good practices with using it) is vital for that, but which one to use… far lesser item. When considering moving to a DVCS, you've got to work out whether the cost of doing so will be recovered in a tolerable timeframe; if it takes 20 years to recover, it's still not worth it for almost all projects.
Donal Fellows
Agreed, which is why I said you have to do the analysis of the costs and benefits.
Paul
+10  A: 

I can see reasons where you might continue to use SVN if you had been using it for a long time. Especially in a small company or coding circle, the transition from SVN to either git or Mercurial, when you might not be using any of the more powerful features of them, might make you adverse to making the switch. As pointed out by Thilo, a large company using SVN is going to find that change monumental.

Also, I think SVN still has is places, particularly when it comes to teaching revision control. But that's taking from my own personal experience of learning SVN in university versus teaching myself git, so my opinions won't be objective on that.

That being said, if you were starting a repository from scratch, I can't think of any conditions where you might decide SVN is absolutely necessary. Perhaps when dealing with legacy systems.

or legacy users ;)

JBirch
+1 for "legacy users"
Thilo
"Especially in a small company". And in a big company, it would be even more difficult to change the version control system (or anything else).
Thilo
That's a good point, Thilo. I had considered large companies would generally have the foresight to start migrating, but when I *actually* think about large companies and all the managerial managing that goes on within them, perhaps they're most likely to be the ones trapped! I've updated the answer to reflect your statement (attributed, of course) :)
JBirch
-1 on legacy uses, checkout git-svn. You can use git on the client w/ svn as the central repo w/ no change to the legacy infrastructure.
Paul
@Paul: While git-svn is a cool little tool, you don't *gain* anything for it really, and there's a few tradeoffs that have to be made to get a bit more functionality. I don't see git-svn being substantially more powerful than SVN, and it's more restrictive than git. The legacy infrastructure remains the same and you now can interact with it with git commands, but if you're already using SVN and it's working, why would you bother complicating matters?
JBirch
@JBirch: Mainly b/c you gain the ability to have local repositories and manage them offline as needed. that's the #1 reason for DVCS anyway.
Paul
+2  A: 

Subversion integrates very well with Apache!

Docunext
+7  A: 

I think Subversion still works better than Mercurial and Git for large files like media assets, Photoshop files, After Effects composites, etc. I remember Linus Torvalds mentioning big files as one of the very few potential problems with Git in this Google Tech Talk. Mercurial has a few extensions for storing large files outside a repository. So it seems they both suffer some performance degradation and/or other issues in that scenario.

Subversion, on the other hand, is being used by the current Blender Open Movie Project. I don't think they use it to store the rendered frames, since that would be at least a few gigabytes of data for each render pass. But still, with all the 3d scenes, objects, rigs, textures, and scripts, that's still one big repository with many large files.

ShaderOp
+3  A: 

Subversion is ideal when the centralized paradigm is ideal.

One such situation is when working on papers. It makes much more sense just to keep one master copy that everyone pulls from. We don't want to create branches or tags. We just want to keep track of who makes a change and then propagate to all authors.

carl
I would not say "ideal" so much as "the only paradigm that will ever be needed for all time". It is true in some cases.
Jeff Atwood
+52  A: 

On the one hand, SVN integration (with IDE, frameworks, wikis, ...) is very mature, as well as its GUIs and code browsers (even though DVCS like Git and Mercurial progress every day).

On the other hand, introducing a DVCS in an Enterprise environment is still not a trivial task:


Just to be clear, using a DVCS can be a very valid choice:

  • for a new project, where the developers are not tied with legacy tools or processes
  • especially when the developers are not geographically located in the same place (often the case with open-source development, which is why DVCS are mainly used there).

StackOverflow (not an open source project) is using Mercurial (see HgInit, written by Joel Spolsky).
They migrated from SVN to a DVCS:

  • in part because their developers are now all over the world(!)
  • and also because the merge facilities of a DVCS are much more advanced than in SVN.
    (which they need to maintain many parallel slightly different versions of their code base, between SO sites, StackExchange sites V1 and V2, Area 51, ...)
    See "differences between DVCS and CVCS", or "What are the benefits of Mercurial or git over svn for branching/merging?".

  • For a corporate environment (where I am), any transition of any kind is not trivial, because it need to be:

    • funded (money, even if the tools are free)
    • supported (that means having the right people with the right competences)
    • integrated (with existing legacy tools, GUIs, IDEs like a Visual Studio or many others, ...)
    • administrated (in term of common servers, even for a DVCS)
    • documented (especially for users coming with a CVCS like SVN background)

So DVCS can also be very useful in a corporate environment:
(See "Corporate adoption rate of Git?" or "Git-Based Source Control in the Enterprise: Suggested Tools and Practices?".)
It is (even for new projects) simply not as easily put in place than in a smaller structure or in open-source environments.

VonC
+1 for a well-reasoned answer with documentation. :D
Paul
Great links, they actually point how to overcome most of the reasons why people [think they] need to stick with Subversion. The link text is a bit confusing on this, but check out each one to learn more about each issue.
wuputah
DVCS GUIs are *incredibly* immature in my experience. Basically SVN GUIs are at the OSX level now while DVCS GUIS are stuck in Windows for Workgroups 3.11 mode.. it's really, really painful coming from the awesome SVN GUIs to the state of the so-called art in DVCS land. Non-issue if you're a command line person, but for GUI wussies like myself it is brutally painful.
Jeff Atwood
@Jeff: In term of IDE integration, [EGit](http://www.eclipse.org/egit/) will get there (Eclipse is committed: all its projects switched from CVS to Git a year ago), and [Git Extension](http://code.google.com/p/gitextensions/) is also nicer (including a Visual Studio integration). [TortoiseGit](http://code.google.com/p/tortoisegit/) helps the ex-SVN users with a Tortoise-like shell integration. Yes gitk and git-gui tcl-tk-based tools are awful, but there are not the only alternative out there. [GitX on Mac](http://gitx.frim.nl) is also not too shabby.
VonC
+4  A: 

The real question isn't SVN vs. Git/Mercurial, it's distributed vs. centralized. Centralized can be better in some situations such as a corporate environment where you need tight control and thorough logging.

Adam Crume
you can use git as a centralized version control system (we use it that way, but we also take advantage on the extra features)
Yorirou
+3  A: 

We use subversion as storage for data, which is non trivial to merge (we do hardware development, and the design files are a undocumented binary format). SVN has the advantage that you can set locks on files, so only one developer can work on a file, and is also forced to check out the newest file before editing.

Rudi
+1  A: 

You can use both Git and Hg as SVN clients. That means you can have the best of both worlds.

You cannot however use SVN as a client for either Git or Hg.

In many ways the ideal case is a central SVN repository with users using whichever DVCS they like as a client.

SVN is much easier to learn and use for many people, and its tooling is far more mature.

sylvanaar
+2  A: 

My answer is based on a few assumptions:

  • The subject matter you're storing in source control is source code, and what you're doing with the code is professional software development.
  • You should always use the best tool for the job; As the Joel Test says, you should use the best tools that money can buy - even if they're free.
  • External factors are irrelevant to choosing what is the best tool for the job - these are the roadblocks you must overcome to adoption. Those reasons in the meantime are excuses to continue to use Subversion, not reasons why you should explicitly use it.

Secondly, that a DVCS is considered a better, more powerful tool than Subversion. It has been discussed a lot on Stack Overflow in the past, and other answers have chimed in that most people agree that DVCS is "the better mousetrap." I don't feel it's necessary to prove this point; you can peruse the linked/similar questions already posted here. Of course, not every single DVCS will be better than Subversion in every aspect, but I believe that leading DVCS's like Mercurial, git, etc are better than Subversion is nearly every aspect.

So by my logic, if you are going to choose the best tool for the job, and Subversion is an inferior tool, Subversion should no longer be used. That doesn't mean we'll see instant, worldwide adoption, but it is my contention that--if you believe in using the best tool for the job--all organizations should plan to move to a DVCS. Of course, many will not, and I expect people will continue to use Subversion for a long time.

wuputah