What do you do with MQ?

Wujek Srujek wujek.srujek at googlemail.com
Wed Dec 7 02:35:00 CST 2011


Hi. I have just tested this:
1. commit
2. pull (tip change)
3. qimport -r tip
mq told me that 'abort: working directory revision is not qtip' (mercurial
1.9.1), so the 'amend' chain would break, which is good, as there is no
room for wrongly amended changesets. Nice. This only underlines the shell
approach with '&&' to chain the commands is superior to ';', I guess.
Thanks for teaching me some new stuff about mq.

(I am sorry that I wrote to you personally, it's my email client, or rather
my inability to use it correctly - I click 'reply', it replied to you, not
the mercurial mailing list. I will try to do better in the future.)

wujek

On Wed, Dec 7, 2011 at 9:27 AM, Martin Geisler <mg at aragost.com> wrote:

> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20111207/84becefb/attachment.html>


More information about the Mercurial mailing list