For many branches this will raise BranchCannotBePrivate but we could relax that, and it's mostly a separate issue anyhow. Some branches have a policy that allows them to be set private.
So we mostly need glue from the bzr ui (and probably configuration) so it will set this after it creates the branch, before it pushes anything in to it.
You can, through the lp api, do
br.explicitly _private = True
For many branches this will raise BranchCannotBeP rivate but we could relax that, and it's mostly a separate issue anyhow. Some branches have a policy that allows them to be set private.
So we mostly need glue from the bzr ui (and probably configuration) so it will set this after it creates the branch, before it pushes anything in to it.