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

Steve Borho steve at borho.org
Mon Apr 11 10:12:23 CDT 2011


On Mon, Apr 11, 2011 at 7:44 AM, Peter Arrenbrecht
<peter.arrenbrecht at gmail.com> wrote:
> On Mon, Apr 11, 2011 at 11:37 AM, Idan K <idankk86 at gmail.com> 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?
>
> Sounds useful. Even more so if it gets integrated into TortoiseHg's
> hunk selection view.

FWIW: thg's shelve tool already allows you to move chunks between
unapplied patches and/or the working directory.

-- 
Steve Borho


More information about the Mercurial-devel mailing list