|
From: Daniel J S. <dan...@ie...> - 2014-03-03 00:46:04
|
On 02/24/2014 04:42 PM, Clark Gaylord wrote: > I would certainly agree that git is apparently more prevalent than hg but both have reasonable critical mass. I wouldn't be concerned about the vitality of either. I would suggest those who are interested do a real comparison relative to how you want the project to work, and do so with an open mind relative to your preferred default. > > For example one thing git does well is manage changes that do not respect file structure, whereas hg considers the file to be the artifact that is managed. I think in gnuplot the latter is consistent with how we think of the code base, but git's perspective is interesting. From my understanding, the reason that git is more flexible in terms of modifying past comments as pointed out by Mojca is fact that the underlying manner in which files are stored in git is as complete files, albeit hash files. On the other hand, hg uses a series of diffs. Thus hg is in more sense "immutable". There is a bit of philosophy with this, however. Going back through local changesets and making modifications to comments, etc. is one thing, but once the canonical version of the repository is modified it is best to leave that be--the reason being that there are possibly hundreds of other developers who have clones of that repository and modifying the base of the canonical version risks upsetting the apple cart for a lot of people. So, once a push is done and considered public, it is best to be immutable. Locally, I'm often deconstructing some sequence of two or three changesets and correcting things in mercurial. From the sound of it, it is probably easier to do such a thing in git, but it isn't that difficult in hg either so long as the canonical repository is still not updated as a reference point to get back to. Changesets can be exported/copied from one clone to another so long as their bases are the same. Mercurial makes a little noise doing such a thing now and then, but often diffs can be imported without too much fuss. I recently read a blog post by Steve Losh that made a good point about the big difference between the two systems: the look and feel. I pretty much agree with that. For me, the two differences that stood out when I compared git and mercurial years ago (git I have limited exposure with since): 1) I found hg's syntax more understandable and less cumbersome. I didn't like the staging area concept of Git because it felt repetitive, although I'm sure there might be some simple ways of circumventing this staging area because git does provide so many options/configurations. So please point out if that is still true and a big difference between the two systems. 2) Mercurial has a built in html server that I really like. Does git have that now? I really like being able to go to some project's repository online and there is that similar, nice interface for finding info about recent changesets, browsing code, viewing file history, etc. That really is an important part of source control. (One of the nicest VCS's in terms of visual navigation is a commercial product, but isn't a distributed VCS but more along the lines of cvs.) Recently I've discovered tortoisehg which is a very nice interface for Windows users especially. I assume there is a tourtoisegit as well. So, for Windows developers, hg and git look-and-feel differences might hardly matter. Also, a good merge tool is worth considering, but I think that might independent of the git/hg question. Dan |