r/programming • u/member42 • Nov 16 '13
What does SVN do better than git?
http://programmers.stackexchange.com/questions/111633/what-does-svn-do-better-than-git
599
Upvotes
r/programming • u/member42 • Nov 16 '13
90
u/dcxi Nov 16 '13
Being able to clone subtrees is quite handy. I often miss it when using git/hg.
255
u/weltraumMonster Nov 16 '13 edited Nov 16 '13
You can explain most people how to use it in much less time.
75
u/busterbcook Nov 16 '13
Subversion has consistent and simple command-line argument semantics.
git reminds me a little of using netware 2 - tons of commands with extremely subtle and arbitrary differences. e.g.: --set-uptream vs --set-upstream-to, or git pull vs git fetch vs git pull --merge.
That said, I love rebase, and would love it more if I could share a feature branch with someone using upstream without having to periodically blow it away.
73
u/looneysquash Nov 16 '13
I see a lot of replies here that are "here's what you have to do to make this work in git". Which is nice and helpful.
But it doesn't mean that those things aren't problems. I think it actually emphasizes the problem.
I almost reminds me of the problems with Linux, at least back in the day. Sure, you can get everything to work, if you fight with it long enough and google enough and ask enough questions.
But I do like git. I wish the developers would read this thread and the SE thread, and make all of those things Just Work.
42
u/[deleted] Nov 16 '13
Large files.
20
u/Bwob Nov 16 '13
Have a sensible and consistent command syntax.
97
u/badsectoracula Nov 16 '13
SVN provides better control for the project, allowing locks (crucial when working - for example - on games where there are lots of binary files that should be touched only by a single person, who is usually "the owner" of the file). Also when you work with non-coders (in gamedev, that would be artists, sound engineers, musicians, etc) you really want your tools to be as frictionless as possible because if there is a possibility to do something wrong with the VCS, someone will do it. Finally Git can a a major PITA when working on huge (multi-GB working copies) repositories and would require frequent trimming to the head if your local copy is on a small SSD.
Of course this isn't specific to Git vs SVN, but more to DVCS vs CVCS and would work the same as a comparison between Hg vs Perforce.
At work (if you haven't guessed it already, i work at gamedev) we use a CVCS and while i'd really love to have the ability for DVCS features (especially doing short-lived branches for bug fixes or features), but the benefits that the CVCS gives outweight the negatives. Being able to save the artists from stomping over each other's work while working in the game editor by simply popping up a message that "you cannot modify this file because it is checked out by XYZ" or showing in the editor's asset browser that some assets are out of date because someone uploaded new ones is a good thing. Also linear versioning makes easier to communicate with the users/artists/designers ("the new feature that doesn't crash your editor will be available at 234783" -- the users know that any version number after that will also contain the feature).
Of course at home for my pet projects i just put everything into Fossil repositories. I tried to convert my local work copy (which has over 100GB of data) to Fossil at some point but Fossil was unresponsive for ~40 minutes before i decided to kill it :-P.
8
u/mdf356 Nov 16 '13
Some of the comments leave me confused. Like, they mention there's no "central repo" with git.
Can't I set up e.g. git.company.com as the master git repo, and the build server only pulls its code from that repo? Doesn't that de-facto become a master git server? It won't matter what kind of git cloning you do, eventually code has to make it back to that repo to be built. Or does that somehow negate the usefulness of git?
The other complaint I hear is about branch merging. I've used git svn and I don't find it any easier or harder to manage conflicts when I git rebase than when I svn merge. In both cases there's code / diff that doesn't apply cleanly and needs manual intervention. So what does everyone mean when they say svn sucks at merging and git is so much easier?
8
u/threemux Nov 16 '13
I think a better title for this thread would be: In what situations does SVN make more sense than Git?
TL;DR: There is no silver bullet
I see a lot of game devs talking about how CVCS works better for them, and that's great - they should continue to use what works.
However, for daily, "classic" software workflow where you're working on small(ish) text files, git makes life far easier. Wanna work on more than one feature at once easily? Good luck in SVN. Branching is expensive, fraught with errors, and generally just a PITA. Have an open source project where you don't trust every committer? The forking model of Git is perfect. Many of the issues regarding permissions in this thread can be solved with this model.
6
u/i8beef Nov 16 '13
Handling large binary files
5
u/Chaoslab Nov 16 '13
Still looking for a decent GIT plugin for Eclipse, one that works like the SVN plugin does.
Already a GIT convert and gotten used to GitGui instead but still miss Eclipse's auto scrolling compare.
5
u/midnightfraser Nov 17 '13
Big files. I'm working on a game and have 106GB SVN repo (growing) with history of all the content (some binary, some huge text files like Collada models). I tried migrating this to Git, and it was so incredibly slow. You can say that big binaries aren't what version control is for -- I will counter with "it has been incredibly useful to have content in the same repository as code, so you can take your ideological purity elsewhere".
8
u/caadbury Nov 16 '13
Externals.
4
u/SanityInAnarchy Nov 17 '13
Well, the top reply is garbage. Because I'm too lazy to make a StackOverflow account yet, I'll list some advantages here:
That said, here are some things being said that I think aren't really advantages:
That said, I still think that unless you're doing something crazy like stuffing Photoshop files into source control, you should be using Git. And even if you are stuffing Photoshop files into source control, maybe you should be using Git for everything that still fits a traditional software development model (lots of small text files plus maybe a few static images). Even with the real advantages I listed above for SVN, I think Git's advantages far outweigh them.
12
u/alextk Nov 16 '13
I don't understand this argument: any developer has a copy of the source code on their machine, whether they use SVN or Git.
7
u/eakmeister Nov 16 '13
Not true at all, plenty of government project use git. Having a centralized repo doesn't provide extra security.
19
u/happyscrappy Nov 16 '13
Binary data.
Better command line.
History is inviolate (good if your company expects your SCM to retain a history of work, obviously bad for some things).
Doesn't keep a copy of every revision ever on your local disk (esp. bad with binary files).
And SVN commit's handling of conflicting changes that prevent commit is better than git's handling of conflicting changes that prevent pushes. So basically, SVN is better at the SVN model of conflict resolution and commit/push. Of course many who use git don't use this model, they use a pull request model instead which git is of course better at.
11
u/dgb75 Nov 16 '13
IMO, SVN handles most use cases better than Git because of its simplicity. Git was developed to be a massively distributed version control system usable even without an internet connection. It's a great system for massive projects like the Linux kernel. Chances are, though, you don't need it. Chances are the simplicity of SVN will work far better for you than Git.
14
u/f2u Nov 16 '13
Subversion identifies clearly who caused a change to end up in the official repository. Git doesn't, it allows developers to push other people's work (or attribute their own work to others), and only out-of-band mechanisms (certain variants of commit notifications) can reveal that.
7
u/[deleted] Nov 16 '13
It's not directly SVN, but SVN generally has better support in IDEs. I couldn't find a decent GIT plugin for vs2005 and vs2008, but I found a wonderful free one for SVN.
2
u/civildisobedient Nov 16 '13
I think the SVN mental model is fundamentally easier to wrap your mind around; that said, I think Git's design is more beautiful.
2
u/redsteakraw Nov 16 '13
Force a single workflow and allowing individual files to be checked out instead of the whole repo. In practice code projects aren't all that large and cloning the whole repo isn't a big deal so that point is pretty much moot.
2
u/n0rad Nov 16 '13
SVN was the closest we got to a Delta-V implementation which is essentially versioned WebDAV. So in some sense SVN was more webby than git.
2
u/stox Nov 16 '13
Git is effectively a single user program, svn is true multi-user. This becomes woefully apparent when everyone is trying to push to master after 4PM on a Friday.
2
u/doormouse76 Nov 17 '13
For really trivial projects when you're working on a collective release, I miss svn's serialized versioning.
5
u/jlpoole Nov 16 '13
When working behind a corporate firewall on Windows, I had to give up trying to get the Windows Git client, it could not traverse the firewall whereas the Subversion Windows Client, Tortoise SVN, did so painlessly.
6
u/andd81 Nov 16 '13
SVN has a clean and simple UI.
But on the other hand, with Git, even if your team does nothing valuable you can make the impression of hard work just by doing version control. Define an alias which displays the graph in a colourful and nerdy way and check it every now and then with a troubled concentrated look. When doing code review, ask to rebase, then ask to squash commits, then ask to rebase again as chances are someone else's changes will get into the repo in the meantime. Screw up a rebase, forget about it for a while and then spend another hour untangling the resulting mess, preferably together with your teammates.
3
u/ForeverAlot Nov 16 '13
I'm a terrible Computer Scientist, but I find DAGs' arrow direction bloody confusing. To me,
A --> BimpliesBcomes (directly) afterA. In Git it's the other way around.Fortunately this isn't remotely relevant pretty much ever, but I seemed to run across such images a lot when picking up Git. It didn't help my learning in the least. I get what the idea is now but it still just looks like a COMEFROM.
3
u/crusoe Nov 16 '13
Merge terribly
2
u/urquan Nov 16 '13
SVN has a better user interface (by that I mean the command line, not GUI tools), there is a small set of commands that make sense. GIT's interface is inconsistent, bloated and uses abstruse terminology. It is also dissymmetric (for example take
git addvsgit reset HEAD) which makes memorization more difficult. It's improved slightly since the first releases but it's still a huge hurdle for newcomers, and in my opinion GIT's main flaw.1
u/rjcarr Nov 16 '13
I've been using svn for many years and git for only about one but the biggest plus for me is ease of use. Subversion is just really straight forward. Any time I need to do anything other than pull, commit, or push I have to look it up for git.
That said, using branches (and then later merging) is much more pleasant in git so the complexity is worth it.
1
u/dnew Nov 17 '13
You can check out just the head. If your repository is terabytes in size with dozens of commits per minute, duplicating all that to the local machine is infeasible.
That said, git is probably easier to fake on a network, like storing files remotely until you actually try to open them and then pulling them down.
1
u/[deleted] Nov 18 '13
single point of failure feature comes free with svn
1
u/cowardlydragon Nov 18 '13
ordered build/releases number/stamps... DVCS can't do that very easily without a master coordinator.
-1
u/[deleted] Nov 16 '13 edited Nov 16 '13
First off file locking is a false sense of security, in any SCM system. It's just a flyer going "please don't touch this." SVN even allows you to just unlock something by simply asking it nicely (--force). Locking is a "feature" that tries to replace good communication and planning.
Subversion is a Central repository
There is nothing stopping you from doing this with git. When people say centralized, all they want is an authoritative repository. Tell your developers to push to repo X at location Y and there you go, there's also plenty of projects that address this setup.
There is nothing stopping you from implementing a finer-grained control system with git. I don't even know how to properly address this because it's so stupid, but I'll try:
Subversion is Conventional Wisdom
This I can understand. But DVCS is the way forward. If you're working with people who either refuse to take the time to learn git/or something other OR just simply can't wrap there head around it after using it, it might be time to reevaluate your place of employment.
I sat down and explained to a few front engineers, who didn't even really use SVN, on how to properly operate git. The only issue I ever had with them was fixing the Github windows client.
Subversion does it one way, and nothing else
Not only is this definitely not true, I don't see how this can ever be a plus. Developers are faced with a multitude of options on their day to day basis in all of their tools. Having to choose the appropriate tool for the task at hand shouldn't be listed as a negative, especially when it's something you as a developer have to do everyday.
All I see in this article and these comments in /r/programming is ignorance. "I don't know this tool and didn't take the time to learn so allow me to explain everything I don't know and attribute it to git's shortcomings."
But I guess some people just love branching and merging with SVN. Fun fun.
-1
u/SilverCats Nov 16 '13
I've used both. I think the only thing that SVN does better than git is corrupting repositories, being slow and generally get in the way of doing actual work.
1
u/Calamitosity Nov 17 '13
Eat commits.
-3
u/Azuvector Nov 16 '13
Not used git, but I've dabbled with Mercurial, which is an inferior version of same thing to my understanding.
SVN is less of a headache all around. It's straightforward and it just works, including sharing a repository with nontechnical folks like artists and such.
-1
u/imfineny Nov 16 '13
Git encourages sloppy branch work.
0
u/argv_minus_one Nov 16 '13
Being slow and annoying.
I'm no fan of Git. I'm a Mercurial man, through and through. But I'd much sooner use Git than Subversion. Git is bad, but Subversion is terrible.
Whoever thought "tree conflicts" were a useful feature should be worked over with a clue-by-four.
0
u/eliben Nov 16 '13
Git can be a HR filtering tool for your organization/project. Some people just don't get it, and they are usually bad coders. SVN is way easier to understand.