[BZRTOOLS] checkout/repository stuff

Aaron Bentley aaron.bentley at utoronto.ca
Mon Mar 27 21:18:42 BST 2006


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

Hi all,

I've added some things to bzrtools to make it nicer to work with
checkouts and repositories.

(For more info about bzrtools, see http://bazaar-vcs.org/BzrTools)

The way I want to work is like this:

/mnt/bzr/bzrrepo - Repository of bzr stuff
/mnt/bzr/pfrepo  - Repository of proprietary work stuff
~/bzr - Bzr checkouts from ~/bzrrepo
~/ - Checkouts of stuff from ~/pfrepo

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?

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

- - /mnt/bzr is on a network mount (so my colleagues can see my commits),
but I do my development on a local drive.

- - We can easily and efficiently back up /mnt/bzr during our daily backups

- - It's cheap to push my whole bzr repo to
http://panoramicfeedback.com/opensource/bzr/repo/

BUT-- the UI could be improved a bit.  Here's what I've added:

cbranch
=======
This command is like branch, but it makes both a [lightweight] checkout
and a branch.  The branch goes in the repository location, and the
checkout goes in the cwd.  This requires a little manual configuration
in branches.conf:

[/home/abentley/bzr]
cbranch_root = /mnt/bzr/bzrrepo

[/home/abentley/]
cbranch_root = /mnt/bzr/pfrepo

This means that if I'm in /home/abentley/bzr, and I do 'bzr branch ab
win32fixes', it creates a branch at '/mnt/bzrrepo/win32fixes' and a
checkout at '/home/abentley/bzr/win32fixes'.

Note: at present, cbranch doesn't care whether you're in
'/home/abentley/bzr/' or a subdirectory of it.  I plan to fix that.

zap
===
When you're done with a checkout, you can rm -r it.  This is nice, but
- - What if that was a branch, not a checkout?
- - What if you forgot to commit your last change?
- - What if you want to get rid of the associated branch, also?

zap takes care of these issues.  'bzr zap /home/abentley/bzr/win32fixes'
will destroy /home/abentley/bzr/win32fixes, as long as it's a
[lightweight] checkout with no uncommitted changes.

And if you want to zap both /home/abentley/bzr/win32fixes and
/mnt/bzr/bzrrepo/win32fixes, you can do "bzr zap --branch win32fixes".
(This should work with sftp, and ftp, but I haven't tested that yet.)

I will probably extend zap to handle bound branches, too.

branches
========
This will list all the branches under a location.  Given a repository
root, it will list all the branches in the repository.  This works
remotely.  On http, it does screen-scraping of apache-style directory
indexes, so it will not work if indexing is disabled.

multi-pull
==========
This command will pull all the referenced branches under the cwd (or
specified location).  When it encounters branches, it pulls them.  When
it encounters checkouts, it pulls the associated branches.

It will work in a directory that contains a bunch of checkouts, or in a
repository.  Although it shares code with 'branches', it doesn't work
over http (because http is read-only).

Hope this stuff is useful to you.  Suggestions are welcome.

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

iD8DBQFEKEii0F+nu1YWqI0RArw0AJ9Q4FgxSmCWsjh3JJdkPqq6siWbiwCdFAJo
BTgso8UOoWDqPFb9zzYuAwM=
=8r3U
-----END PGP SIGNATURE-----




More information about the bazaar mailing list