confused by repositories

John A Meinel john at arbash-meinel.com
Wed May 10 17:30:04 BST 2006


Aaron Bentley wrote:
> Ilpo Nyyssönen wrote:
>> John A Meinel <john at arbash-meinel.com> writes:
>>
>>
>>> But this only sets what the default will be for a new branch, and as
>>> mentioned, running 'bzr checkout' in that directory will create a
>>> working tree.
>>
>> Is there a command for removing the working tree?
> 
> No.  Personally, I like to keep my checkouts separate from my repository, so
>  - I can 'rm -r' the checkouts without losing data
>  - I can publish my repositories with rsync
>  - I can back up my repoitories without including redundant working trees
>  - All the inactive branches don't clutter up my working area.
> 
> Aaron

For ease of use, I create a public and a local repository. So I have:

sftp://juju/srv/bzr/public/branches/bzr/

As my public repository, accessible over http from:
http://bzr.arbash-meinel.com/branches/bzr

And then I create a local repository at:
~/dev/bzr

To set this up, I do:

$ ssh juju
$ bzr init-repo /srv/bzr/public/branches/bzr/
$ exit
$ bzr init-repo --trees ~/dev/bzr
$ cd dev/bzr/
$ bzr init new-project
$ cd new-project
# do stuff, and commit
$ bzr push sftp://juju/srv/bzr/public/branches/bzr/new-project
$ bzr bind sftp://juju/srv/bzr/public/branches/bzr/new-project

At this point I have a heavy checkout (bound branch) and any changes to
my local new-project should show up on my public location. Which still
means that I can nuke my local working copy whenever I want.

And for projects that I already have, I can just do:

$ cd ~/dev/bzr/
$ bzr checkout sftp://juju/srv/bzr/public/branches/bzr/old-project
$ cd old-project

And once again I have a working directory which is bound, but shares a
repository with other branches so that I don't have to push/pull as many
revisions.

I think Aaron uses a local repository and a remote repository, and then
light-checkouts on top of that. Something like:

$ ssh otherhost
$ bzr init-repo /public-repo
$ exit
$ bzr init-repo ~/local-repo
$ cd dev
$ bzr checkout --lightweight ~/local-repo/branch

I'm not sure how he does the binding, but it does keep his repositories
(both local and remote) clean from working trees.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060510/2622f49d/attachment.pgp 


More information about the bazaar mailing list