converting a standalone branch in a shared-repo branch

Asked by Parth Malwankar


Sometime back I created a standalone branch
"$ bzr branch LOCATION mybranch". This is quite a big branch (actually and now
that I understand shared repo better I am working if it is possible for me to move/convert
this standalone branch to a branch in a shared repo.

I tried bzr bind but that sees to set the checkout but parent remains the same:

[parth:bzr]% mkdir code
[parth:bzr]% cd code
[parth:code]% bzr init-repo --1.9 .
Shared repository with trees (format: 1.9 or development-wt5)
  shared repository: .
[parth:code]% bzr branch ../
Branched 4011 revision(s).
[parth:code]% cd
[]% bzr info
Repository tree (format: 1.9)
  shared repository: /home/parth/src/bzr/code
  repository branch: .

Related branches:
  parent branch: /home/parth/src/bzr/
[]% bzr bind
[]% bzr info
Repository checkout (format: 1.9)
  repository checkout root: .
        checkout of branch:
         shared repository: /home/parth/src/bzr/code

Related branches:
  parent branch: /home/parth/src/bzr/


Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Solved by:
Matt Nordhoff
Last query:
Last reply:
Revision history for this message
Best Matt Nordhoff (mnordhoff) said :

You did a "bzr branch" into the shared repo, which did create a new branch using the shared repo. You can fix the parent location by doing "bzr pull --remember", and then delete the old branch or whatever.

You could have also done something like this:

[parth:bzr]% bzr init-repo --1.9 code
[parth:bzr]% mv code
[parth:bzr]% cd code/
[]% bzr reconfigure --use-shared

(If I understand your directory layout correctly.)

Revision history for this message
Matt Nordhoff (mnordhoff) said :

(Also, you can run "bzr unbind" to convert it from a checkout back to a regular branch.)

Revision history for this message
Parth Malwankar (parthm) said :

Thanks Matt Nordhoff, that solved my question.