Create new patches with hg qnew patch-name and then update them with new changes with hg qrefresh:
hg qnew myFirstPatch // Creates a new patch called "myFirstPatch"
... // Edit some files
hg qrefresh // Updates "myFirstPatch" with changes
hg qnew ...
Pushing a patch applies the patch to the repository while poping a patch unapplies the patch from the repository.
Pop the current patch off the queue with hg qpop and push it back onto the queue with hg qpush:
hg qpop
hg qpush
Pop all patches:
hg qpop -a
PUsh all patches:
hg qpush -a
...
Finishing patches makes them permanent changesets.
Finish first applied patch in the queue:
hg qfinish
Finish all applied patches in the queue:
hg qfinish -a
To rebase with latest changesets in upstream repository:
hg qpop -a // Pop all patches
hg pull -u // Pull in changesets from upstream repo and update
hg qpush -a // Push all patches on top of new changesets
If there are any conflicts you will be forced to merge your patches.
More than one queue may be created. Each queue can be thought of as a separate branch.
hg qqueue --create foo // Create a new queue called "foo"
hg qqueue --list // List all queues
hg qqueue --active // Print name of active queue
hg qqueue --rename bar // Rename active queue ...
qnew: create a new patch
qpop: pop the current patch off the stack
qpush: push the next patch onto the stack
qrefresh: update the current patch
qapplied: print the patches already applied
qseries: print the entire series file
qfinish: move applied patches into repository history
qdelete: re...