I'm having difficulties understanding bzr init-repo
.
I have 3 projects that I want to have in their own isolated repository, in subversion I would use svnadmin create
three times to create them. Like this:
svnadmin create MyProject
svnadmin create MyHomepage
svnadmin create MyDocuments
The above would give 3 isolated subversion repositories.
How do you create 3 isolated shared bazaar repositories?
would you do it this way
bzr init-repo ./repo
bzr init ./repo/MyProject
bzr init ./repo/MyHomepage
bzr init ./repo/MyDocuments
Or would you do it this way
bzr init-repo ./MyProject
bzr init ./MyProject/trunk
bzr init-repo ./MyHomepage
bzr init ./MyHomepage/trunk
bzr init-repo ./MyDocuments
bzr init ./MyDocuments/trunk
Or is there another way?
bzr init-repo creates shared repository which is used to store branches' historical data. So all branches inside one shared repo will actually share the storage. Therefore you will need less space for history data of every branch, and faster branching.
If you don't care about space efficiency and speed of new branch creation then don't use shared repositories.
So if you want to have several branches for every of your projects (MyProject, MyHomepage, MyDocuments) the right way is:
bzr init-repo ./MyProject
bzr init ./MyProject/trunk
bzr init-repo ./MyHomepage
bzr init ./MyHomepage/trunk
bzr init-repo ./MyDocuments
bzr init ./MyDocuments/trunk
If you plan to have only one branch for every of your project then don't use shared repo at all, and do as James Polley suggested.
You even can create shared repo later and put your current branch into it with bzr reconfigure --use-shared
.
I wouldn't use init-repo at all, as they're not intended to be branches of the same code but independent projects.
I'd just do:
bzr init ./MyProject
bzr init ./MyHomepage
bzr init ./MyDocuments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With