The Mercurial way of doing it?
Christian Boos
cboos at neuf.fr
Sun Dec 13 09:47:30 CST 2009
Nicolas Dumazet wrote:
> Hello!
>
> 2009/12/13 Tom Medhurst <tom.medhurst at googlemail.com>:
> [...]
>
>> ...which in Git; reverts back all the changesets in the cust-bike_dock
>> branch, then applies all the missing release-v2 changesets, then reapplies
>> the bike-dock changes. This is all done with the following command:
>> git rebase --onto release-v2 release-v1 cust-bike_dock
>> I was wondering how can I do this in Mercurial? Should I use
>> patch-queues/tags/bookmarks/branches? Can I rebase from one parent to
>> another?
>>
>
> Yes you can!
>
> I think that the Rebase extension, distributed with mercurial, should
> pretty much fit your needs.
> Have a look at http://mercurial.selenic.com/wiki/RebaseExtension
>
However, there's a caveat for the specific scenario you're interested
in, as you'll end up with:
|---------[release-v2] o----o[cust-bike_dock]
[master]o--| /
|---------[release-v1] ---
i.e. the first rebased changeset from cust-bike_dock will be a merge
changeset.
See http://mercurial.selenic.com/bts/issue1950 for some details. In
short, it seems to work as designed, whether this is a good thing or
might be changed if possible is up for discussion.
-- Christian
More information about the Mercurial
mailing list