Tuesday, 15 March 2011

version control - hg mq (nested|sub|child) queues -


I know that this is not an HG feature, but maybe someone has something similar to meet. Hopefully my description comes into being:

I find it useful to keep my main line (i.e. the default branch) in the patch queue for a few weeks so that they can "systematize" them. However, I would like to be able to create topic branches through new queues. These two ideas are unique to each other, because you can not create a new line starting with an applied patch. The only way to do this is to finalize the patch of my main line, and start the lines of the branch from the qparent committment, and finally by importing the patch back to MQ, any other ideas? Is GIT better at such a workflow?

I have not tried this answer and I do not know that it will work, Or if you want to know what it is. "

When you make an MQ for your repository, it creates this as an existing mercurial repo, so your internal structure is something like this:

  .hg \ cache \ patches \ .hg \ .hgignore patch1 patch2 chain status store \ hgrc ...   

You can work directly on the patches repository Can do ( In fact if you are something like me then you have to install some scripts to work easily on that repo - I have a mq command for me).

Since MQs have a repository in their possession, it can be committed, drawn, pushed, etc. In theory these branches may be involved.

Be a potential workflow, every time you think that you are happy with the patch, you take it in a patch repo:

  hg qnew patch -3 - M "Something" ... hg qref mq commit -m "happy with patch3"   

Note that this is not creating patches for your main repository, it only patch history If at some point you decide that you want to create a branch, then you can do it like this:

  mq branch some branches hg qnew patc H4 -m "something else" ... hg qref mq commit -m "committed to new patches branch" mq update default   

patch 4 patch now closed , And does not even appear in your patch range, even the unchanged list.

This is a possible solution that could work, but a test repository would need to be fully investigated, and if you are not careful, it can also be a terrible mistake.

No comments:

Post a Comment