Why is branching in SVN not good enough?

I've heard so much about how Git has redesigned how branching works, and how SVN's branching model is screwed up.

I've not used much SVN, so I have no preconceptions about what a branch should look like. I first looked at git branches, and I "get" it.

What are the practical drawbacks of SVN branches?

Answers from the POV of workflow, branching strategy and branch performance (in terms of commit/checkout/switch times) encouraged.

Thanks, jrh


A few things come to mind

  • All the branches are stored in the central repository. If you're not connected to that server, or your connection to it is slow, then you can't access them quickly.
  • All the branches are stored in the central repository. This means they're public -- anyone on the team can view them. There's no way to keep a private branch that no one else has access to.
  • The DAG of commits itself contains enough information so that you can figure out which changes are included in your current version of the code, including changes from any number of branches. In svn, IIRC, this is done using an svn:mergeinfo property, which is more complicated IMHO, and is error-prone because someone might forget to commit the changed property.

  • The main problem is that Subversion makes a poor work tracking changes and merge information (for instance, directories are not first class objects and there's no true rename support). As soon as you try to port changes between branches you start getting conflicts. Some conflicts are reasonable (the same line was edited in both branches) but other have little explanation.

    If you are even asking it's clear that you're not lying and you haven't used Subversion too much because these conflicts appear almost immediately :)

    链接地址: http://www.djcxy.com/p/49082.html

    上一篇: 在Qt4版本中没有显示SVG图标

    下一篇: 为什么在SVN中分支不够好?