What do you do with MQ?

Martin Geisler mg at aragost.com
Wed Dec 7 02:27:51 CST 2011


Wujek Srujek <wujek.srujek at googlemail.com> writes:

(I'm sending the reply back to the mailinglist so that others can
benefit from it too.)

> But 'the last applied patch' is the variable in this equation, isn't
> it? I mean, you do a qimport tip (and tip is variable, and after you
> pull, it is something else it was before the pull), which changes tip
> to be 'the last applied patch', and then you refresh it with local
> changes...

You're right that tip changes when you pull, but mq can handle that. The
working copy parent revision does not change when you pull, and 'hg
qrefresh' only requires that qtip is the working copy parent revision.

I know that tip == qtip 99% of the time (at least it is for me), but
it's actually possible to use 'hg update' to jump around and make other
commits while you have patches applied. Pulling changesets is another
way to add normal commits "elsewhere" when patches are applied.

I hope that helps a bit! Please update the wiki as appropriate if it's
missing this information. I prefer that someone like you do it since the
explanations need to make sense to you, not me.

> Please correct my if I am wrong, I love to understand the tools I use
> evey day, and apparently I am missing something here.
>
> wujek
>
> On Tue, Dec 6, 2011 at 10:46 PM, Martin Geisler <mg at lazybytes.net> wrote:
>
>> Wujek Srujek <wujek.srujek at googlemail.com> writes:
>>
>> > I think this example:
>> > hg qimport -r tip ; hg qrefresh; hg qfinish -a
>> > is wrong. What happens if you pull in between the commit and the
>> > amend?
>>
>> Nothing happens, you would still refresh the last applied patch.
>>
>> --
>> Martin Geisler
>>
>> Mercurial links: http://mercurial.ch/
>>

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial mailing list