r/programming • • Nov 16 '13

What does SVN do better than git?

http://programmers.stackexchange.com/questions/111633/what-does-svn-do-better-than-git
604 Upvotes

494 comments sorted by

View all comments

Show parent comment

15

u/f2u Nov 16 '13

Not really, there is no locking in a truly distributed system, and of course no linear versioning.

19

u/moor-GAYZ Nov 16 '13

and of course no linear versioning.

That's not true. You can have linear versioning if you want.

5

u/seruus Nov 16 '13

And it isn't that hard to do if you ask all contributors to rebase before pushing the changes/sending a pull request.

1

u/moor-GAYZ Nov 16 '13

And then git-describe + tagging for versions (which you would do in some form in SVN as well) allows for human-readable sub-version (pun intended) descriptions that are even better than SVN revision number: it prints the latest version plus the number of commits since that.

5

u/chronoBG Nov 16 '13

Yes, we know all that. Now try and explain it to an artist.

To be fair, visual tools like GitHub for Mac/Windows and tortoiseGit alleviate most of those issues.

0

u/[deleted] Nov 16 '13

[deleted] — view deleted comment

8

u/[deleted] Nov 16 '13

I hear this "SPOF" argument all of the time but I just don't see it.

Let your ops people handle the redundancy and backup of your data, not the developers (consumers) of that resource.

3

u/LovelyDay Nov 16 '13

Veracity is a DVCS which has file locking.

Disclaimer: I haven't used it, so can't speak to how well it works.

0

u/[deleted] Nov 16 '13

[deleted] — view deleted comment

-1

u/f2u Nov 16 '13

Everybody has to agree on a target repository and branch for rebasing, otherwise there will never be a single linear history. That's not really distributed.

2

u/Klayy Nov 16 '13

What do you mean by no linear versioning? If you only use one branch it's quite linear indeed.

I don't have much experience with locking in SVN - is it done automatically after someone modifies a file? Or do they have to lock manually?

5

u/[deleted] Nov 16 '13

The way that people typically use SVN locks is to set a per-file property that enforces locking. All such files will be set to read-only in an OS-specific way unless you own a lock on them. svn lock tells the server "hey, I want to lock file X" and allows you to write to the file. If anyone else locked it, you'll get an error stating so and you move on to something else.

You can also manually lock any file in which case they'll be read-only for everyone else after they next update. Manual locking generally isn't such a great idea because you have no guarantee that the other team members saw the lock; still, the server will prevent commits to those files, so it could be useful sometimes.

1

u/xiongchiamiov Nov 16 '13

They lock it manually before they modify the file.

4

u/Klayy Nov 16 '13

So if they forget, this feature doesn't do anything. I see.

5

u/Kalium Nov 16 '13

Locking is a feature designed for narrow use cases. It should not apply to every modification and should not be expected to.

Like it rerere. The High Priests of Git extol its virtues, but those who never use it will find it of no benefit.

1

u/xiongchiamiov Nov 16 '13

If they forget, they have to deal with the results. The point of locking is to prevent conflicts with files that can't be merged, e.g. binary assets.

1

u/koreth Nov 16 '13

In many cases their tools do it automatically, so there's nothing to forget.

1

u/Klayy Nov 16 '13

Which tools can do that?

1

u/BinaryRockStar Nov 16 '13

TFS can do this. If you start editing a file through VS or another TFS-enabled IDE/tool, the file will be checked out and locked.