RFC: adding a 'qsplit' command to interactively split an mq patch

Augie Fackler durin42 at gmail.com
Mon Apr 11 07:48:29 CDT 2011


On Apr 11, 2011, at 4:37 AM, Idan K wrote:
> 
> Hi,
> 
> I'm thinking of adding a 'qsplit' command to mq that lets the user
> accept/reject hunks from the current patch (or a specified one) to be moved
> to a new one. Selection will be done like shelve/record.
> This is mostly useful for splitting by content since splitting by files can
> be done with 'qrefresh' (see [1]).
> 
> Usage might look like this: hg qsplit [existing-patch-to-split]
> <new-patch-name>
> 
> Example:
> 
> $ hg qtop
> patch-to-split
> 
> $ hg qsplit new-splitted
> [interactively accept/reject hunks from 'patch-to-split' that will move to
> 'new-splitted']
> 
> $ hg qseries
> patch-to-split
> new-splitted
> 
> $ hg qtop
> new-splitted
> 
> AFAIK it's possible to do this manually as described in [1], but I've had to
> do this on several occasions to want a more friendly alternative.
> 
> How does this sound to other mq users?

I think I'd be more interested in an 'hg qpop --no-changes' which would pop a patch without updating the files in the working copy, since if we had that you could just use qrecord for patch splitting needs and other types of trickery.

Both is probably even better, but mq is already a nightmare of extra commands as it is...


> [1]:
> http://mercurial.selenic.com/wiki/MqTutorial#Split_a_patch_into_multiple_patches
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel




More information about the Mercurial-devel mailing list