English 中文(简体)
bzr init-repo and multiple projects
原标题:
  • 时间:2009-12-30 13:39:21
  •  标签:
  • dvcs
  • bazaar

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?

最佳回答

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
问题回答

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.





相关问题
bzr init-repo and multiple projects

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 ...

How suitable is a DVCS for the corporate environment?

I ve been using SVN for some time now, and am pretty happy with how it works (but I can t say I m an expert, and I haven t really done much with branches and merging). However an opportunity has ...

Renaming directories with the Fossil DVCS

Is it possible to rename directories with Fossil? I ve tried the obvious command: fossil mv oldname newname Fossil then informs me that it has done something: RENAME oldname newname However, ...

Distributed source control for VisualWorks Smalltalk

One of the annoying things about Smalltalk is that it (usually) requires its own VCS, due to the way that it manages its source code. Squeak and Gemstone (at least in its GLASS version) have a DVCS ...

Can I clone part of a Mercurial repository?

Is it possible to clone part of a Mercurial repository? Let s say the repository is quite large, or contains multiple projects, or multiple branches. Can I clone only part of the repository? E.g. in ...

How does git track source code moved between files?

Apparently, when you move a function from one source code file to another, the git revision log (for the new file) can show you where that code fragment was originally coming from (see for example the ...

热门标签