There's no good way to do this, which is why convert
shouldn't be part of a bi-directional workflow. It is possible to use convert
incrementally, so you can go A to B many times, but you can't go B to A. You could try to hg export
patches from B and hg import
them into A, and it would probably work, but when you then hg convert
A into B again they'll double up and the merge will probably be hard.
Consider splitting the repo into two separate repos with the public stuff as a sub repository of the whole repo.
/projectname
stuff.txt
/folder1
/folder3_that_was_pulled_in_for_some_reason
/projectname-public
/folder2/subfolder1
/folder2/subfolder2
When projectname-public
is a sub-repository, then it can be cloned separately, released separately, and you can take pull requests and patched and merge them in easily.
Subrepos aren't for beginners, but they're easier than round-tripping on convert
.