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

Patrick Mézard pmezard at gmail.com
Mon Apr 11 09:59:12 CDT 2011


Le 11/04/11 16:48, Idan K a écrit :
> On Mon, Apr 11, 2011 at 4:04 PM, Patrick Mézard <pmezard at gmail.com> wrote:
> 
>> Le 11/04/11 14:48, Augie Fackler a écrit :
>>> 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?
>>
>> hg qrefresh --interactive should be considered too.
>>
>> But it is harder to implement because of the regular/--short modes.
>>
>> --
>> Patrick Mézard
>>
> 
> I actually think qrefresh --interactive should have been used instead of
> introducing a new command for qrecord. Maybe when record moves into core we
> can rethink this (changing record to commit --interactive, too).

"hg qrecord" is really "hg qnew --interactive" rather than qrefresh.

--
Patrick Mézard



More information about the Mercurial-devel mailing list