3 ms·
Rebasing avoids cluttering up your history, and can help make your patches more useful. Instead of showing a fork in your history, followed by independent deve
by gecko 18y ago
Rebasing avoids cluttering up your history, and can help make your patches more useful. Instead of showing a fork in your history, followed by independent development, and then a merge, you instead show your branch applied to the tip of the other branch/repository, as if that had been your intention all along. This can result in more meaningful changesets as well: if a change upstream forces some changes to my new feature's code, it will be more useful for reviewing my feature if I rebase my changes so that they incorporate that slight fix. This is superb when you're keeping a fork of an open-source project, and have a collection of patches you want to keep applying cleanly to the remote software, for example.
In my opinion, lightweight branching is mostly just a performance hack--and since Mercurial already did cloning with hard links on a local file system, you've been able to get the same performance benefits since before Mercurial 1.0. I do think it's worth understanding, though, that there's also a UI benefit to making building throwaway branches really easy, and I think it's silly to discount that purely because it's a user experience benefit. That's why I do think that having the bookmarks extension in Mercurial 1.1 will be a very good thing.