4

I asked a question 3 years ago: How and/or why is merging in Git better than in SVN?

Back then I think we were on SVN 1.6 but now we've reached 1.8 and it seems merging is one area they've done substantial work on.

So in the light of these changes, has SVN 1.8 caught up with the better merging and branching support in DVCS like git?

Community
  • 1
  • 1
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
  • Out of curiosity, are you still using SVN instead of Git or Mercurial? –  Aug 14 '13 at 06:30
  • Be aware that people choose git/mercurial over SVN for many reasons. The branching is only one side of it. They are distributed so you are able to push/pull changes from a central "origin" repository and from your co-workers' machines if you're pair programming or if your origin server goes down. https://git.wiki.kernel.org/index.php/GitSvnComparison – WattsInABox Aug 19 '13 at 12:26
  • @WattsInABox that's why I'm interested, from the opposite direction - I have no interest really in the distributed/decentralised aspects so for me the ease of branching and merging is the main draw of hg/git - if SVN could do it equally well I'd rather use SVN. – Mr. Boy Aug 20 '13 at 13:24
  • The decentralized aspect helps with branching, too. You can easily push and save work to the central repository and completely bork the branch on your local machine. Also, having a 100% copy of the repository helps if the central repo goes down. The amount of time I spent dealing with repo locks and corrupted repos was enough for me to switch, but the rest of the benefits of git make SVN look ancient. – WattsInABox Aug 21 '13 at 02:03

1 Answers1

7

SVN 1.8 does seem to have advanced things slightly with 'reingtegration' now being an automatic action. You also don't have to do the dance to keep a branch alive after it's been merged back any more.

These were real annoyances for me, and it's good they're gone.

The thing is SVN merging always seems to have problems with the handling of the mergeinfo records. If you're not aware, these are properties added to points in the tree when a merge is done. They record which versions are ancestors of the merged version, so that when another merge is done changes in those versions aren't re-merged.

Unfortunately SVN seems to get confused and I've often see it apply changes multiple times. I personally think there's a fundamental flaw with the way it records what it's previously merged, but I've never been able to work out what's exactly gone wrong.

Fact is branching and merging were an afterthought and low priority feature for SVN, whereas it's a fundamental feature of DVCSs. Branching works in SVN, I've used it quite heavily. It's certainly better than some VCS. I don't think it will ever work quite as well as branching in a DVCS.

Paul S
  • 7,645
  • 2
  • 24
  • 36