What are the internal structural differences between distributed (e.g Git & Mercurial) and non distributed (Subversion) version control?
The question came from a discussion group where a tool was interacting with CVS and it was argued whether it would be easily ported to other systems or not.
-
1There is a nice introduction to Mercurial by Joel Spolsky, check out the Subversion Re-education chapter.PersonalNexus– PersonalNexus2012年02月13日 19:28:17 +00:00Commented Feb 13, 2012 at 19:28
-
What do you mean by internal structural difference?Karl Bielefeldt– Karl Bielefeldt2012年02月13日 19:29:57 +00:00Commented Feb 13, 2012 at 19:29
-
Don't you just love WikipediaDynamic– Dynamic2012年02月17日 22:37:48 +00:00Commented Feb 17, 2012 at 22:37
1 Answer 1
Main internal structural differences I can think of:
- On distributed you get all the previous versions with each pull/get
- On distributed you don't have to phone home when you are about to start editing a file.
- On distributed you will have to have all the functionalities of merging, checking in, etc, because each instance is a full-featured repository
As far as a client goes, a non distributed source control client would be ok if it could do the basic tasks of: getting a specific version, phoning in to tell that you are working on a file, and sending back the changes after looking/resolving any conflicts
-
2There are non-distributed VCSs that don't have to phone home when you start to edit, such as CVS and SVN.David Thornley– David Thornley2012年02月13日 22:25:15 +00:00Commented Feb 13, 2012 at 22:25
-
You mean it's not the default, sure, but a client has to have the function.Mihalis Bagos– Mihalis Bagos2012年02月17日 16:27:34 +00:00Commented Feb 17, 2012 at 16:27
-
1Why? Here, I've got the parts of the codebase I need checked out from Subversion. When I want to edit a file, I do so. When I think it desirable, I merge in changes from the repository, and I do that regardless of what's changed. The only time I communicate with the repository that's related to editing files is when I check them in.David Thornley– David Thornley2012年02月17日 17:53:04 +00:00Commented Feb 17, 2012 at 17:53
-
Again, a client has to have the function. It's not really a centralized repository unless you can lock the file you are working on. On svn it is optional, but it's there, and if you prefer to work decentralized, you better use a system that is decentralized.Mihalis Bagos– Mihalis Bagos2012年02月17日 18:57:32 +00:00Commented Feb 17, 2012 at 18:57
-
I am completely failing to understand. There is one SVN repository here at work, so it has to count as centralized. If it were distributed, there'd be repositories all over (that weren't backups or mirrors). If the lock functionality was removed, it wouldn't affect where I work in the least. Therefore, a SVN-- without locking would be very useful, and I don't see how it would be anything but centralized.David Thornley– David Thornley2012年02月17日 19:41:19 +00:00Commented Feb 17, 2012 at 19:41