This is what I did :
hg init
hg qnew -m \"p1\" p1.patch
; some changes
hg qrefresh
hg qpop
hg qnew -m \"p2\" p2.patch
; some changes
hg qrefresh
hg qpop
You forgot one thing: set of MQ-patches is queue (FIFO queue). I.e if you can see more than one patch in hg qseries
, you have to remember - qpush|qpop will apply|unapply patches not in random order, but in sequential order: push from bottom to top, pop in reverse order
Random access (and changing order of patches in a series as side effect) is --move
option for qpush. In your case (using only one patch at a time) and patches names
hg qpop -a
hg qpush --move p1.patch
hg qpop -a
hg qpush --move p2.patch
In order to avoid mistakes you can redefine qpush (for this repository) in aliases section for always use --move
option