Reverse of qpush --move?
Jason Harris
jason at jasonfharris.com
Thu Jul 8 13:04:08 UTC 2010
On Jul 8, 2010, at 2:56 PM, Matt Mackall wrote:
> On Thu, 2010-07-08 at 09:54 +0100, Colin Caughie wrote:
>> I see Mercurial 1.6 introduces the --move option to the qpush command,
>> to allow you to move a patch to the start of the queue while pushing
>> so that only that one gets applied.
>>
>> This sounds useful, but I've just encountered a situation where I want
>> to do the reverse. I have a patch queue like this:
>>
>> (applied)
>> patchA
>> patchB
>> patchC
>> ------
>> (not applied)
>> patchD
>>
>> and I'd like to do something like "qpop --move patchB" to end up with
>>
>> (applied)
>> patchA
>> patchC
>> ------
>> (not applied)
>> patchB
>> patchD
>
> qpop patchA
> qpush --move patchC
>
>> Is something like this possible?
>
> Note that qpop and qpush --move are functionally complete: any ordering
> can be achieved by combining the two. For instance, Simply pop
> everything and qpush --move each patch into the proper order.
If you have
(applied)
patchA
patchB
patchC
patchD
patchE
patchF
patchI
patchJ
patchK
patchL
----
(not applied)
patchX
patchY
then its very suboptimal to have to do
qpop patchA
qpush -move patchC
qpush -move patchD
qpush -move patchE
qpush -move patchF
qpush -move patchI
qpush -move patchJ
qpush -move patchK
just to do an effective qpop -move patchB
I often have patch depths of 30 or more...
This should be done in code by Mercurial
Cheers,
Jas
> Also note that qpush --move is a lot easier to implement (and much
> better defined) than qpop --move as qpop would have to pull an applied
> changeset out from under other potentially-dependant changes.
>
>> I know I can just pop everything and then hand-edit the series file,
>> but I can see myself wanting to do this quite frequently so it would
>> be nice if there was an easier way.
>
> An easier way than editing a list in a text file? This is a silly thing
> for a programmer to say.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list