howto push uncommited changes to some unapplied patch?

Christian Boos cboos at neuf.fr
Fri Dec 4 14:49:18 CST 2009


Dilip M wrote:
> Example ..how could I just pop and make patch no. 3 as patch no. 1.
>   

Use the http://mercurial.selenic.com/wiki/QupExtension

In your example, making patch 3 (target?) the first patch would be:

hg qup target

(better use names than numbers, it's clearer)


> On 12/4/09, Dilip M <dilipm79 at gmail.com> wrote:
>   
>> On Tue, Dec 1, 2009 at 11:40 AM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
>>     
>>> 2009/12/1 Dilip M <dilipm79 at gmail.com>:
>>>       
>>>> Hello,
>>>>
>>>> I have some 3 patches in queue and I have done hg qpop -a. I have done
>>>> some
>>>> change to a file, which has to be incorporated in some of the patch in
>>>> queue.
>>>>
>>>> qnew -f will only force those changes to go into _new_ patch. But how
>>>> can
>>>> in push those uncommitted changes into one of the patch in queue?
>>>>         
>>> You can qnew -f to create a new change, reorder the patch series, and
>>> fold
>>> the newly created patch with the target patch?
>>>
>>> aka :
>>>  $ hg qser
>>>  before
>>>  target
>>>  after
>>>  $ hg st
>>> (changes you want into "target")
>>>  $ hg qnew -f will_fold_this
>>>  $ hg qpop
>>>  patch queue now empty
>>>
>>> Now reorder the serie to have the patch just after the target:
>>>
>>>  $ $EDITOR .hg/patches/series
>>>
>>> change from:
>>> will_fold_this
>>> before
>>> target
>>> after
>>>
>>> to:
>>>
>>> before
>>> target
>>> will_fold_this
>>> after
>>>       

For such a reorganisation, using qup would be tedious, better keep doing 
it by hand.
qup is very handy when you just want to make an unapplied patch down the 
queue be the qnext one.

-- Christian

>>> Save, quit.
>>>       
>> Is there any option within MQ to mess with series? :) Just asking..
>>
>>
>>
>>
>> --
>> Dilip
>>
>>     
>
>   




More information about the Mercurial mailing list