A tale of user-friendliness with "hg merge" and "hg rollback".

Kevin Bullock kbullock+mercurial at ringworld.org
Tue Oct 13 14:56:43 CDT 2009


On 12 Oct 2009, at 6:02 PM, Mike Meyer wrote:

> This would suggest you're not taking optimal advantage of your
> tools. In particular, that you leave incomplete changes in your
> working copy to start on the next one. If that's not the case, my
> apologies. Handling such properly means creating separate working
> copies for each change, which isn't something that core mercurial
> handles very well.

Umm... I create separate working copies to work on different features  
with (core) Mercurial all the time:

$ hg clone dirty-repo new-feature

...works fine for me?

> In git, you'd use their lightweight branch
> mechanism. Mercurial's branches are a bit much for that, so there's
> lots of extensions around to help out. mq is really popular. I use the
> tasks extension, and I vaguely recall an "attic" or "shelve" extension
> that lets you save changes to the working copy and pull them back
> later.


I use a combination of mq, shelve, and crecord, and they're all great,  
but a branch-by-clone is all you need. Clones are lightweight (using  
hard links, except on Windows). Or do you mean *named* branches?

There's also the `bookmarks` extension, which in combination with  
`shelve` gives you a rough equivalent to `git stash save; git branch  
new-feature; git checkout new-feature`.

Pacem in terris / Mir / Shanti / Salaam / Heiwa
Kevin R. Bullock




More information about the Mercurial mailing list