Grouping commits before pushing

Luiz Guilherme guilhermebrant3 at gmail.com
Sun Jan 29 20:33:21 UTC 2012


Thank you very much Gour, that's pretty much what I was looking for. I 
played around with it the last days, and now I plan to use this daily.

For those who still don't know how to use it:

Just use hg qnew PatchName and hg qrefresh PatchName to start a new 
patch, and save the changes on the patch, respectively, until you're 
ready to commit and push. Then let's suppose your mq queue looks like this:

PatchN
....
Patch3
Patch2
Patch1

Now just do the following sequence of commands:
hg qgoto Patch1  #applies only Patch1
hg qfold Patch2 Patch3 ... PatchN  #join all the listed patches into patch1
hg qrefresh -e  #the option -e to qrefresh enables you to edit the 
commit mesage before qfinish.
hg qfinish # commit it as a regular mercurial changeset.

I just didn't figure out yet if there is a more direct way to qfold a 
list of patches. If I have 10 patches before commiting, it would be 
annoying to list all of them, does anybody know how? Anyways, if you 
have any suggestion please give it to us.

On 26/01/12 11:04, Gour wrote:
> On Thu, 26 Jan 2012 10:52:22 -0200
> Luiz Guilherme Brant Machado<guilhermebrant3 at gmail.com>  wrote:
>
>> I'm a new user to the list as well to mercurial, and this is my first
>> post.
> Welcome. ;)
>
>> I was wondering if there were any way to group some 'commits' in
>> Mercurial before pushing. I found something about Mercurial Queues,
>> but didn't quite get how to do that with it.
> Yes, you can use MQ to toss your patches (aka smaller commits) around
> until they are ready. You can even commit them as regular changesets.
>
> Read this http://stevelosh.com/blog/2010/08/a-git-users-guide-to-mercurial-queues/
>
> Then you can combine your patches with qfold, qpush that patch,
> qfinalize it and...voila, you'll end with one changeset combining all
> your patches.
>
>
> Sincerely,
> Gour
>
>
>
> _______________________________________________
> 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/20120129/343609af/attachment-0002.html>


More information about the Mercurial mailing list