What do you do with MQ?

Wujek Srujek wujek.srujek at googlemail.com
Tue Dec 6 15:54:17 UTC 2011


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? Tip
will move to the last pulled change, and you will amend the wrong commi!
What you should probably do is:
hg qimport -r . && hg qrefresh && hg qfinish -a
Additionally, the && are better then ; as it can happen that some command
does't work (line qimport can fail if you already have a patch with the
same name, which by default is a revision number) the whole chains is
cancelled.

I use strip, all the ones that you mentioned. I also have 'camend' which is
like amend bu uses qrefresh -e to just update the comment if I notice a
typo. Apart from that, I use muliple queues instead of versioning, one for
each branch. This serves me like a multilevel 'shelve'. I love mq.

wujek

On Tue, Dec 6, 2011 at 4:10 PM, Kastner Masilko, Friedrich <
kastner-masilko at at.festo.com> wrote:

> > -----Original Message-----
> > From: mercurial-bounces at selenic.com [mailto:mercurial-
> > bounces at selenic.com] On Behalf Of Arne Babenhauserheide
> >
> > It’s general usecase is clear: manage a queue of patches against a
> > given repository. But that is so vague that it does not say very much
> > and it also does not describe everything you can do with mq. So it
> > interests me, what you do with MQ in terms of actual actions.
>
> MQ (especially in its versioned form) is invaluable for me for
> "customizing" our internal Mercurial/TortoiseHg deployment. Without it, it
> would be really hard to maintain patches to the core without cluttering up
> the original repo's baseline.
>
> > * amend the latest commit:
> >   hg qimport -r tip ; hg qrefresh; hg qfinish -a
> >
> > * fold two changesets:
> >   hg qimport -r REV -r REV; hg qpop -a ; hg qfold ; hg qpush ; hg
> > qfinish -a
> >
> > * do many test commits and fold them into one when finished:
> >   hg qnew -m "change" 1; hg qnew -m "fix" 2; hg qpop 2 ; hg qfold 2 ;
> > hg qfinish -a
> >
> > * refactor commits to have atomic changes (one step per changeset):
> >   (I failed to find an easy way here. What I’d need: hg qsplit: like
> >   qrecord, but takes the changes out of one patch and puts them into a
> >   new one. Then I could just qfold all related patches and qsplit them
> >   into atomic changesets)
> >
> >
> > Which mq actions do you use? (including those for tracking patches)
>
> All 4 you mentioned I use too, with the addition of manually editing the
> patch-files for splitting and/or selective deleting. By far the most used
> action is editing meta-data (message/user) in the last commit. I don't use
> "rollback" at all...
>
> Oh, and of course I use "strip" frequently (it still comes with MQ,
> right?). I would feel lost without it.
>
> regards,
> Fritz
>
>
>
> Development Software Systems
> Festo Gesellschaft m.b.H.
> Linzer Strasse 227
> Austria - 1140 Wien
>
> Firmenbuch Wien
> FN 38435y
> UID: ATU14650108
>
> Tel: +43(1)91075-198
> Fax: +43(1)91075-282
> www.festo.at
>
> Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten
> Adressaten bestimmt. Jede Form der Kenntnisnahme,
> Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieses
> E-Mails durch unberechtigte Dritte ist unzulaessig. Wir
> bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu setzen,
> falls Sie nicht der Adressat dieses E-Mails sind und das
> Material von Ihrem Computer zu loeschen.
>
> This e-mail and any attachments are confidential and intended solely for
> the addressee. The perusal, publication, copying or
> dissemination of the contents of this e-mail by unauthorised third parties
> is prohibited. If you are not the intended recipient of this
> e-mail, please delete it and immediately notify the sender.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20111206/3184cebc/attachment-0002.html>


More information about the Mercurial mailing list