New user with a few questions.
Matt Nordhoff
mnordhoff at mattnordhoff.com
Mon Feb 11 23:52:43 GMT 2008
Raindog wrote:
> Hello,
>
> I am trying to configure the optimal repository layout for my projects
> and am running into some problems.
>
> I want to have the following structure:
>
> MainRepo (init-repo)
> | +projects (?)
> | | +proj1 (init?)
> | | | trunk
> | | | branches
> | | +proj2
> | | +projgroup1 (init-repo)
> | | | +trunk (init)
> | | | | proj1 (add to trunk)
> | | | | proj2 (add to trunk)
> | | | +branches
> | | | | ...
> | +thirdparty
> | | some3rdpartylib
> | +resources
> | | randomstuff
>
>
> Currently I have the following issues:
> 1. When I want to branch in the general term, the docs say to "copy" my
> directory to another location and that that is a new branch. It seems to
> me then that that branch has lost it's relationship to its original/parent.
>
> Ex. copy projects\projgroup1\trunk\
> projects\projgroup1\branches\somebranch
>
> It appears to be that that operation drops the information about the
> branch/copy operation.
If the docs say to use cp instead of "bzr branch", that's not right.
> 2. Similar to the 1st one, if I use bzr branch command, I find I have
> some rather unpleasant limitations. The 1st limitation is that I can no
> longer directly branch projects\projgroup1\trunk\proj1, I have to branch
> projects\projgroup1\trunk. If I want to be able to branch the projects
> in projgroup1\trunk, I have to init each directory and then I have to
> manually push/pull/update/checkout each project which is undesireable
> for users.
Yeah, you can only branch a full branch at the moment, not a
subdirectory of it.
> 3. repositories don't seem to actually have any benefit because users
> have to check out each item in the repo individually, they can't just
> check out the main repo, when they do, they literally get nothing but a
> .bzr folder.
>
>
> My goal is to have a central server, and have been following chapter 5
> of the Bazaar User Guide. The problem is that the guide doesn't mention
> how one would actually go about creating anything but a repo (init-repo)
> that contains a branch (init), but unless you specifically check out the
> branch, if you just check out the repo, again, you get nothing. I can
> also make the repo a branch and add files/revisions to it that way, but
> any branches in the repo are again left out. I don't understand how this
> is desirable or wanted behavior.
>
> Is it common or a best practice to make a repo, make the repo a branch
> also, add a setup script for users to execute after their initial
> checkout that essentially checks out the rest of the branches/repo's of
> the repo?
Shared repos (as created by init-repo) are simply a storage
optimization, nothing more.
If you aren't using a shared repo, and you do "bzr branch a b", b will
get a second copy of all of a's history, which wastes disk space and
time. If they were in a shared repo, the shared repo would hold all of
the history, so there wouldn't be a second copy.
> My second question relates to user authentication. Does bzrserve support
> any user authentication or do I need to configure authentication on the
> protocol such as ssh, etc.
You'd have to use SSH for authentication.
Someone recently created a bzr_access script (see contrib/bzr_access in
the source tree) which may help here.
> Thanks for your time!
> Josh
For the repo layout, I'd do:
projects
| +proj1 (init-repo)
| | trunk* (init)
| | branch1 (init)
| | branch2 (init)
| +proj2 (init-repo)
| ... (same as above)
(I don't have an opinion on the thirdparty and resources parts)
* I'd use "proj1" or "proj1-dev" or something instead of "trunk", so
someone can branch it without having to rename the directory to
something useful.
Whether it would work well for you or not is another story...
--
More information about the bazaar
mailing list