How to migrate my shared repository ?

Asked by Alexandre Garnier

We use the "Nested Style" shared repository layout (, but sadly no tool support it (see bug #273509 and bug #311513).

So I was thinking of changing layout during 2a migration to use a more classic layout : the "preferred way for Bazaar" of

But how can I do that ?
By doing push or pull to/from one repository to another is there any risks to break the relations and the shared history between branches ?
I imagine that I'll have to change all branch.conf to reconnect branches with each other.

I've tried to push my root branch, which is also the repository, and it also pushed the repository but I just want the branch (it will be a 'trunk' inside my repo)
EDIT : but it is OK by doing a (bzr init and bzr pull)

Thanks for help.

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Solved by:
Neil Martinsen-Burrell
Last query:
Last reply:
Revision history for this message
Best Neil Martinsen-Burrell (nmb) said :

Doing push and pull can change the parent links between the branches in the repository (in particular, a push that creates a new branch creates it with the current branch as the parent). If you want to maintain these connections, then you will have to change them in branch.conf after the migration has occurred and the new paths to each branch are determined.

To push your root branch without the repository, try making a new copy of it with ``bzr branch`` and then pushing that new branch into your new repository.

Revision history for this message
Alexandre Garnier (zigarn) said :

OK, that's what I was thinking.

For my root branch, I haven't thought on using 'branch', but isn't it possible to directly do 'bzr branch old_repo_and_trunk new_repo/trunk' ?

Revision history for this message
Alexandre Garnier (zigarn) said :

Thanks Neil Martinsen-Burrell, that solved my question.