converting a standalone branch in a shared-repo branch

Asked by Parth Malwankar

Hello,

Sometime back I created a standalone branch
"$ bzr branch LOCATION mybranch". This is quite a big branch (actually bzr.dev) 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)
Location:
  shared repository: .
[parth:code]% bzr branch ../bzr.dev
Branched 4011 revision(s).
[parth:code]% cd bzr.dev
[parth:bzr.dev]% bzr info
Repository tree (format: 1.9)
Location:
  shared repository: /home/parth/src/bzr/code
  repository branch: .

Related branches:
  parent branch: /home/parth/src/bzr/bzr.dev
[parth:bzr.dev]% bzr bind http://bazaar-vcs.org/bzr/bzr.dev/
[parth:bzr.dev]% bzr info
Repository checkout (format: 1.9)
Location:
  repository checkout root: .
        checkout of branch: http://bazaar-vcs.org/bzr/bzr.dev/
         shared repository: /home/parth/src/bzr/code

Related branches:
  parent branch: /home/parth/src/bzr/bzr.dev
[parth:bzr.dev]%

Thanks.

Question information

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

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 http://bazaar-vcs.org/bzr/bzr.dev/", 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 bzr.dev code
[parth:bzr]% cd code/bzr.dev
[parth:bzr.dev]% bzr reconfigure --use-shared

(If I understand your directory layout correctly.)

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

(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 :
#3

Thanks Matt Nordhoff, that solved my question.