I would like to arrange my last commits as an MQ patch. All the commits are local (never pushed to the server), but not all the local commits are to be converted.
Say, I did 10 commits (never pushed) and now I wish to convert the last 5 to a patch.
How do I do it?
Short version:
$ hg qimport -r "-5:"
Long version:
$ hg qimport -r "last(all(), 5)"
You can import changesets via hg qimport
if you've already got an MQ repository initialised (via hg qinit
. The command only accepts one patch at a time, so to import your last five changesets, you'd need to run the command five times and specify the revision to import via the --rev XXX
parameter.
If your using TortoiseHG, you can import patches from within the TortoiseHG Workbench by right-clicking the changeset to import, then selecting Modify History -> Import to MQ.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With