git rebase - can hg do that ?
David Jack Olrik
david at olrik.dk
Sat Jun 2 17:11:56 UTC 2007
On 02/06/2007, at 3.21, John Goerzen wrote:
> On Sat, Jun 02, 2007 at 02:23:23AM +0200, David Jack Olrik wrote:
>> A'--B'--C' topic
>> /
>> D---E---F---G upstream
>>
>> What I want is my topic branch to be updated with the changes from
>> upstream, with my changes applied on top (i.e. remove my changes from
>> the branch, update id, and re-apply my changes), not the other way
>> around.
>
> But it is the same. All you have to do is hg update -C to the other
> branch, then use hg transplant.
I disagree, but the difference is very subtle. - Assuming all your
changes are made as patches the following sequence is the same as
'git rebase'
hg qpop -a
hg update -C
hg qpush -a
Using the above my commits are my changes to the tip of upstream.
Using 'hg transplant' it will become my changes to my branch point in
upstream + my changes to each 'hg update -C'. If my topic branch
exists for a long time this will generate a more complex merge when I
decide to push my changes vs. a less complex merge and more 'clean'
patch against the current tip of upstream.
So although the difference is very subtle, I believe it is an
important one.
--
Best regards,
David Jack Olrik <david at olrik.dk> http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is You do not talk about Perl club"]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1855 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20070602/4b896576/attachment-0001.p7s>
More information about the Mercurial
mailing list