Queues
Links
Install
Edit ~/.hgrc
:
[extensions]
hgext.mq =
Note: I had to install the extension as follows:
[extensions]
hgext.mq =
To verify the extension is working:
hg help qinit
Initialise
To initialise the repository:
hg init mq-sandbox
cd mq-sandbox
hg qinit
Patch
Patches are created in a queue…
Create:
hg qnew first.patch
Refresh
Update (commit) the current patch:
hg qrefresh
Patch - Add to the queue…
You can add another patch to the queue:
hg qnew second.patch
Information
To see the patches which are currently applied to your source:
$ hg qapplied
first.patch
second.patch
To see all the patches in the queue:
$ hg qseries
first.patch
second.patch
third.patch
Push/Pop
To push/pop the patches in the queue:
hg qpop
hg qpush
Remember to use hg qapplied
to see which patches are applied.
To push or pop all patches in the queue, use the -a
option:
hg qpop -a
hg qpush -a
Converting the patch to a changeset.
For more information, the following links might help:
Guards
Patches can be applied conditionally using guards. For more information see Conditionally applying patches with guards.