What do you do with MQ?

Scott Palmer swpalmer at gmail.com
Tue Dec 6 13:31:16 CST 2011


On 2011-12-06, at 9:42 AM, Arne Babenhauserheide wrote:

> Hi, 
> 
> Mercurial Queues offer extremely powerful options for working with
> unfinished changes.
> 
> 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.
> 
> To show what I mean instead of just telling, these are mq actions
> which strike me as directly useful even when I don’t explicitely track
> patches:
> 
> 
> * 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)

None.  I look at the above examples and find them all very confusing.
Plain Mercurial I find very intuitive, not this.  The terms just don't relate to any real-world actions like the basic "clone", "update", "commit", "push", "pull", "merge" terms do.

I feel strongly that I would be doing things more efficiently if I grokked this stuff.

I must find the time read http://mercurial.selenic.org/wiki/MqTutorial
(Then I must find the time to try it out.)

Scott



More information about the Mercurial mailing list