I'm not quite sure what you really want here. Adding a remote branch to your local repository and recreating a repository from another are completely different things. The linked question is about the second, and the answers are spot-on, so I will address what you originally intended to do.
First of all, it's confusing when you say "main trunk repository", because "trunk" typically means a "main branch", and branches and repositories are different concepts, so "trunk repository" doesn't really make sense.
It seems to me that you have a shared repository: a container directory for multiple branches. For the sake of clarity: you create a shared repository with the command bzr init-repo
, and you create branches in it with bzr init
(new empty branch), or with bzr branch
(copy of another branch, local or not).
Let's say you have a shared repository organized like this:
└── /tmp/shared/repo
├── bugfix123
├── feature1
└── feature2
If you want to add remote branches of your teammates, you can do it with:
bzr branch url_of_remote_branch /tmp/shared/repo/somename
For example if your teammate has a branch at the url lp:~jack/proj/bugfix312
you could get it into your local repository with:
bzr branch lp:~jack/proj/bugfix312 /tmp/shared/repo/bugfix312
If later you decide you don't want to merge this branch, you can get rid of it with the commands:
bzr remove-branch /tmp/shared/repo/bugfix312
rm -fr /tmp/shared/repo/bugfix312
The first command only removes Bazaar's branch data, it keeps the directory intact. The second removes the working directory itself.
Let me know if you are looking for something else.