Create patch for series of existing changesets that were created without using MQ?

Grigory Ptashko grigory.ptashko at gmail.com
Wed Apr 27 16:45:16 UTC 2016


Hello.

I've recently started to work on an open source project which uses Mercurial. I'm a new user to Mercurial, so I read the HG book and started working. My goal was to write code and always pull and merge changes from the upstream so I can stay up-to-date. The area that I am working on is also under heavy development by others so I do want to merge my changes after a long period of time. I cloned a repo. So, my workflow is like this:

	• I created a bookmark mybook
	• hg up mybook
	• Write code
3.1 hg commit -m 'new functions'

	• hg up default
	• hg pull
	• hg update
	• hg up mybook
	• hg merge default
	• Go to step 3.
In my mind this is the simplest workflow that allows me to stay up-to-date. I also have only one HEAD because I always merge.

Since I am not a contributor yet, I am not allowed to push changes to remote repo.

Recently I wanted to show my work to a project lead and he said send me a patch. And this is where I am stuck. hg out shows 10 changesets. First of which appeard already a month ago. They're numbers are 3341, 3342, 3345, 3346, 3349, 3356, 3360, 3365, 3366, 3368. The changeset numer 3368 is the tip.

I've recently read the chapter about the MQ extension. And this extensions seems to be what I need. But the problem is that I wrote code without using the MQ extension.

So, how can I make use of the MQ extension on already created changesets so that I can make a patch to send to the project lead so that he can apply it and see my changes?

I've just issued hg qinit. What's next? Issueing hg qimport -r 3341 gives

abort: revision 3341 has unmanaged children

Reading the book and googling further does not help me. I need an advice.

PS I've tried not using hg and MQ at all: simple diff -urN old/ new/ but I want understand how to do it with the MQ.

Thank you.

--
Best regards,
Grigory Ptashko

+7 (916) 1489766
grigory.ptashko at gmail.com
facebook.com/GrigoryPtashko



More information about the Mercurial mailing list