On Thursday, February 3, 2011 11:56:03 PM UTC+1, Mike Hopper wrote: > > I've been using git for 2 years and Mercurial for 1 year and I am very > spoiled by git and thus get a bit frustrated with Mercurial. The > killer feature for git over Mercurial is the ability to create > throwaway branches to manage parallel work. With git I can create a > experimental branch, keep it around for awhile, and if I like the > results I can merge the branch commits back to the trunk (master) and > delete the branch. But with Mercurial, the commits on the branch will > forever have a link back to their original branch, so it is difficult > to delete the branch when you are done with it. > The equivalent in Mercurial would be:
- create a bookmark (which is the equivalent of a git branch) - hack, hack, hack - rebase the branch onto the main head - delete the bookmark Alternatively you could branch via a clone... then eventually rebase onto the head and delete the clone (rm -rf) Git also does a great job of figuring out my directory and file > renames after the fact (i.e. when I refactor code). With Mercurial, I > have to do the "hg rename --after <old_file_name> <new_file_name> but > git just figures it out for me (once I add the affected files to the > index / stage). > As far as my understanding goes you *can't* force a rename in git, which feels like a shame to me. On the otherhand in Mercurial you also have addremove (to figure out renames from similarities) as well as IDE hooks in refactoring which solve most cases of refactor-renames. Other great git features: branch rebasing and using the index / stage > to do a partial commit of some changes to master followed by creating > a branch to continue working on some idea. Mercurial offers many of > these features via plugins, but with git these features are first > class citizens in the git ecosystem. > But the fact that they're plugins shouldn't be a problem, seeing as we're talking about power user features. You got to figure out how to enable the plugins first, which is a good barrier to inadvertently shooting yourself in the foot by mistake. Also Mercurial has named branches (which are simply called branches in the Mercurial space) which git doesn't have, but I think are better alternatives to git's light branches in some cases (for instance I would use them for hotfix commits and release candidate fix commits). Finally Mercurial has local changeset numbers which I think are very very useful, I use them everyday :) In the end I looked at git and Mercurial, and everything I could do in git I can do in Mercurial, Mercurial has a few nice things that git doesn't offer, and the whole of it is: - backwardly-compatible to older versions of Mercurial - has a clearer and cleaner UI - is at its core safe-first Also, it's Python (yay Python :D) and apparently very easy to extends. I personally could deal with coding something up in Python and sharing it but I would never jump into the deep end and try and extend git. Dale -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
