How can I only push the needed HEADS of a subrepo from within the parent repo.
I've started using a bookmark style process for local feature branches in mercurial. It works great so far, just commit, bookmark and switch in and out of that head to work. I can push and pull just fine by specifying hg push -r master-bookmark
to only push my main head and not any feature branches.
The problem comes when I use multiple heads with bookmarks in a subrepo. Because it means I cannot just use hg push -r master-bookmark
because it then tries to push all the heads of the subrepo. I don't want these heads going public until I'm ready but I need to get some other changes out within the parent, so I'm not forcing them.
I've tried dropping into the sub-repo and pushing what I need, but the parent will still try and push everything regardless of whether it's in the ancestry of the `.hgsubstate'.
Any one got any ideas on what kind of workflow is best for this? I'd rather not have to disable the sub-repo, push, then re-enable, that will get very messy.
You could take advantage of the phases
feature that makes this sort of workflow quite easy.
https://www.mercurial-scm.org/wiki/Phases
When you make a branch/bookmark/commit phase secret
it's not pushed unless you explicitly do so. It's a great way to flag work that's not yet ready to share.