Question

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?

Was it helpful?

Solution

Short version:

$ hg qimport -r "-5:"

Long version:

$ hg qimport -r "last(all(), 5)"

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top