howto push uncommited changes to some unapplied patch?
Christian Boos
cboos at neuf.fr
Tue Dec 1 02:25:45 CST 2009
Nicolas Dumazet 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
>
> Save, quit.
> Now push up to the target patch:
> $ hg qgoto target
> And fold will_fold_this into target:
> $ hg qfold will_fold_this
>
While I still often do the above out of habit, the attic extension can
be useful here:
hg shelve
hg qgoto target
hg unshelve
hg qref
-- Christian
More information about the Mercurial
mailing list