Shared repo setup

Joshua Judson Rosen jrosen at harvestai.com
Wed Jul 2 17:24:39 UTC 2014


On 2014-07-02 12:25, Gordon Tyler wrote:
> Bazaar can separate the metadata for a branch from the repo directory which
> contains the revisions in that branch. "bzr init" creates the repo inside the
> same directory as the branch metadata. "bzr init-repo" creates only the repo but
> no branch metadata.
>
> This should work:
>
> bzr init-repo --no-tree /path/to/repo
> cd /path/to/repo
> mkdir branch_name
> cd branch_name
> bzr init


Or even just:

	bzr init-repo --no-tree /path/to/repo
	bzr init /path/to/repo/branch_name

I believe both of those commands will also work if remote URLs are given, e.g.:

	bzr init-repo bzr+ssh://server/path/to/repo
	bzr init --no-tree bzr+ssh://server/path/to/repo/branch_name

And if you want the default to be "--no-tree" for all branches created in
your repository, then you can invoke "bzr init-repo" with "--no-trees"
(and then you don't need to pass "--no-tree" to "bzr init"). So:

	bzr init-repo --no-trees bzr+ssh://server/path/to/repo
	bzr init bzr+ssh://server/path/to/repo/branch_name


> There will now be a branch in /path/to/repo/branch_name which can be cloned
> using "bzr branch ssh://path/to/repo/branch_name". This branch will store its
> revisions in /path/to/repo and will share that revision data with any other
> branch created within the same repo directory.
>
> The warning about the working tree not being updated is because you created a
> branch + repo + working directory on the server but push operations will not
> update the working directory on the server. You will not get this warning when
> using a --no-tree repo on the server.
>
>
>
> On Wed, Jul 2, 2014 at 12:16 PM, Lucio Crusca <lucio at sulweb.org
> <mailto:lucio at sulweb.org>> wrote:
>
>     Hello all,
>
>     I'm trying to setup a shared repo for the first time. If, on the server I issue
>     a "bzr init /path/to/repo", then on the client I'm able to "bzr branch
>     ssh://path/to/repo", but "bzr push :parent" warns about the working tree not
>     being updated.
>
>     If on the server I issue "bzr init-repo --no-tree /path/to/repo", then on the
>     client "brz branch ssh://path/to/repo" tells /path/to/repo is not a branch,
>     but it is a repository.
>
>     So, what the exact difference between "bzr init" and "bzr init-repo"?
>
>

-- 
"'tis an ill wind that blows no minds."



More information about the bazaar mailing list