[BZRTOOLS] checkout/repository stuff

Aaron Bentley aaron.bentley at utoronto.ca
Tue Mar 28 15:38:07 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik Bågfors wrote:
> 2006/3/27, Aaron Bentley <aaron.bentley at utoronto.ca>:
>>~/bzr - Bzr checkouts from ~/bzrrepo
>>~/ - Checkouts of stuff from ~/pfrepo
> 
> 
> Are you using lightweight checkouts here?

Yes.  Grr, it's frustrating that I have to call them that now.

>>This has several advantages over the tree-in-repo configuration that
>>Erik's patch makes possible.
>>
>>- - branch storage is cheap, so making branches is cheap.  Have you
>>noticed I'm more prone to making branches now?
> 
> 
> In my setup, it's cheap also, apart from the working tree (which you
> can always rm -rf :) )

Removing the working tree from a repository while keeping the branch is
not something supported by the UI, so it's dangerous and/or confusing.

>>- - branches do not get in the way; as soon as I'm done with a checkout, I
>>can get rid of it, and the branch is retained in the repository, so I
>>can check it out later, if I like.
> 
> 
> This is what I have a central repo on a sftp server for..

My central repo is on an NFS server.

>>- - /mnt/bzr is on a network mount (so my colleagues can see my commits),
>>but I do my development on a local drive.
> 
> 
> Why don't you use sftp here?

I'm on the same LAN as the server.  NFS has less latency and is more
convenient to use.

>>cbranch
> Does this work over sftp? The normal bzr branch command doesn't (which
> bothers me alot)

No, it's only as good as the underlying branch command, which it uses.

But if you don't have trees in your local repository, you can use rsync
to push it, which means rsync will do the branch management on the
central server.to the server

> The thing I like with working trees in the branches, is that I can
> work the same way as I've always done.
> 
> Used to be like this
> mkdir project
> cd project
> bzr branch http://host/upstream
> bzr branch upstream mybranch
> cd mybranch
> hack hack hack
> bzr push sftp://.....
> 
> Now, it's like this
> bzr init-repo --trees project
> cd project
> bzr branch http://host/upstream
> bzr branch upstream mybranch
> cd mybranch
> hack hack hack
> bzr push sftp://.....

This way means people don't have to push manually, and that sharing is
the default instead of requiring extra effort.

> Also, with bound branches and a central repo, it becomes
> 
> bzr ini-repo --trees project
> cd project
> bzr checkout sftp://host/path/branch1
> bzr checkout sftp://host/path/branch2
> 
> and the checkout shares the repository.

No, that's not the same example.  You're now assuming that the branch
already exists on the sftp host.  The bound branch example is:

bzr init-repo --trees project
cd project
bzr branch http://host/upstream stfp://host/path/upstream
bzr branch stfp://host/path/upstream stfp://host/path/mybranch
bzr checkout stfp://host/path/mybranch
cd mybranch
hack hack hack

Yes, there should be a way to create a remote branch from another remote
branch.  (branch can do remote-> local and local-> local, push can do
local -> remote.)

Some of these steps are one-time steps-- I don't expect to create many
repositories.

So I would abbreviate it as
$bzr branch http://host/upstream stfp://host/path/upstream
$bzr branch stfp://host/path/upstream stfp://host/path/mybranch
$bzr checkout stfp://host/path/mybranch

Using a cbranch-like command (or cbranch-- I can change it to produce
bound branches, too), you don't need to type the sftp path:

$bzr cbranch http://host/upstream
$bzr cbranch upstream mybranch

> With this setup I can also delete everything from my local computer,
> it's all in the shared central repo.

At the cost of
- - manually pushing branches or
- - making a cron job to push branches or
- - slow bound-branch commits.  (because it's both commit and pull)

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEKUpP0F+nu1YWqI0RAqa9AJwM7SvdOIludP3gIWzfCg42EtR3dgCff4SK
Dvkdepa+MGI7uepZBuqCsT4=
=S+L+
-----END PGP SIGNATURE-----




More information about the bazaar mailing list