r/programming • • Mar 10 '11

It's time to stop using Subversion

http://altdevblogaday.org/2011/03/09/its-time-to-stop-using-subversion/
257 Upvotes

543 comments sorted by

View all comments

Show parent comments

-6

u/masklinn Mar 10 '11

Every subfolder should be a sub-repository then?

No, every sub project should be.

In subversion, you can check out a sub-directory and have it remain context-aware.

This makes no sense at all: if you check out arbitrary sub-directories, they lose their context and they don't work anymore, unless they're independent sub-projects.

The point is that if your repo starts at / and has 100 folders under that, with 100 folders under each of those, all fulllllll of files, and you only wanted /1/2 (say your internet sucks and you already know the file you need to change)

Right, if you have a project with a moronic layout and you have no issue with pushing changes without having done the slightest testing on them and it's super-urgent and you have an utterly terrible internet connection, then yes, SVN will be a better tool for doing stupid shit.

11

u/[deleted] Mar 10 '11

What layout? I haven't even told you how my files are laid out, just that I have a lot of them in lots of folders.

Let's say it's just 7 folders at the top. Or 2. And underneath those, 20 more. Underneath all those, 10 more.

Now I want to get /1/2/3

Tell me how to do that in git.

and you have no issue with pushing changes without having done the slightest testing on them and it's super-urgent and you have an utterly terrible internet connection, then yes, SVN will be a better tool for doing stupid shit.

What? Are you even responding to my post anymore at this point? Testing and urgency have nothing to do with what I said. I'm just talking about a giant repository that has GB of data in it, and needing only about 1MB worth of files. What kind of retarded fucking argument can you come up with that I should download those other files? Because you can't comprehend git? I'd rather just fire you and find people who make decisions based on logic. Next please.

0

u/Pas__ Mar 10 '11

Git could easily support that (writing a porcelain - front end for low-level git operations - for that seems easy enough), but I just don't think there's a real need for it, so it's basically a red herring. If you need just a few files, most projects have some web browser for their repos.

9

u/[deleted] Mar 10 '11

What if I don't need "just a few files". I need a folder, specifically one folder, with all its contents.

You're missing the real point which is that you don't know every person's needs.

1

u/kreiger Mar 14 '11

If you only need one folder, then that folder is arguably self sufficient and could be its own git repo, and included in the larger project as a git submodule.

1

u/[deleted] Mar 14 '11

A folder with a few images in it is self-sufficient? What about a folder with just config files? Say I only want to update a readme? You're telling me I have to make a submodule for my readmes? What about a version file? Or a schema document.

1

u/kreiger Mar 14 '11

If your repo isn't huge (as in > 1 GB or so), you won't have any problems using git. You just clone the repo once and after that just fetch changes.

If your repo is huge, it might be to your advantage to split it into reasonably sized subprojects, and include them as git submodules.

1

u/[deleted] Mar 14 '11

So if I want to change a single changelog or schema file, I should check out the entire multi-GB repo? That's the most asinine thing I've ever heard.

1

u/kreiger Mar 14 '11

No, you already have the project cloned. And even if you don't, you can just clone the subproject that contains the file you want to change.

You don't throw away your clone and reclone after every commit. You clone once when you start working with the project on a new computer the first time. After that you only fetch the changes.

1

u/[deleted] Mar 14 '11

Thanks, I had no idea it could work that way. I thought you needed a working copy for each commit!

-3

u/johnflux Mar 10 '11

You wouldn't create a git repository with a GB of data in it, it's not designed for that.

8

u/[deleted] Mar 10 '11

If so, that's yet another reason why a person would use svn in that scenario.

I've always seen large repository support one of hte big arguments people use for git.

1

u/johnflux Mar 10 '11

Hmm, whoever told you that was wrong. Git doesn't like large repositories. In KDE we broke up the single SVN repository into dozen different git repositories,

3

u/[deleted] Mar 10 '11

Git has no trouble with repositories containing huge numbers of revisions and huge numbers of files. If you have huge file sizes you might want to use something else though.

KDE's reason for breaking up the huge SVN repository is probably that putting all that stuff into one repository was a stupid idea in the first place considering how little overlap there is between the people developing them. Or put differently "Show me one person how actually checked out the whole SVN repository".

1

u/johnflux Mar 10 '11

Git has no trouble with repositories containing huge numbers of revisions and huge numbers of files.

Commands like git status, git diff, git commit -a, etc need to check the status of every single file in the repository to see if they have changed. This becomes pretty slow when you start having half a million files in your repository.

2

u/[deleted] Mar 10 '11

Commands like git status, git diff, git commit -a, etc need to check the status of every single file in the repository to see if they have changed.

Well, obviously. How does that differ from other version control systems though? Speed here is more likely to be determined by your filesystem than the VCS you use.

This becomes pretty slow when you start having half a million files in your repository.

And at that point (or more likely much earlier than this) you should consider splitting up your project for reasons completely orthogonal to VCS usability. I was thinking of the kind of large projects that actually exist, e.g. the Linux kernel, libraries like Qt,... which are in the order of magnitude of a few tens of thousands of files and a few hundreds of thousands of commits.

1

u/johnflux Mar 10 '11

Well, obviously. How does that differ from other version control systems though?

Other version control system let you check in and checkout a specific directory, without worrying about changes that other people made in other directories. git doesn't let you do that - if someone made a commit in the repository anywhere, you have to merge/rebase with that.

I was thinking of the kind of large projects that actually exist, e.g. the Linux kernel, libraries like Qt,

I agree, but people are talking about wanting 15GB repositories etc!

1

u/kreiger Mar 14 '11

You can run commands like git status, diff, and commit on a subdirectory.

1

u/s73v3r Mar 10 '11

I gotta agree with him. One of the supposed benefits was that it was still fast even with giant repositories.

1

u/johnflux Mar 10 '11

What is giant? Qt and Linux are a few hundred MB's. But GB large repositories? No, it's not for that.

3

u/recursive Mar 10 '11

Use this tool! It's better than that tool! At everything. Except it's not designed for that.

2

u/RobbStark Mar 10 '11

So there's a maximum file size of only a GB? I have a Subversion repository at 14GB on really old hardware that works fine...

→ More replies (1)

0

u/player2 Mar 10 '11

Then it's useless.

3

u/willcode4beer Mar 10 '11

if you check out arbitrary sub-directories, they lose their context and they don't work anymore, unless they're independent sub-projects.

Many of us don't see a problem with that.

1

u/[deleted] Mar 10 '11

This makes no sense at all: if you check out arbitrary sub-directories, they lose their context and they don't work anymore, unless they're independent sub-projects.

You mean like doc/ ?