[RFC] 'public_branch' with checkouts

John Arbash Meinel john at arbash-meinel.com
Sat Jan 27 15:18:16 GMT 2007


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

I've been trying to setup the post-commit emailer, and I realized that
our current 'public_branch' notation could be better.

What I was realizing is that I use a lot of checkouts to auto-publish
commits to a public place. Some of those go to my personal web-server
(by bzr branches), and some of them go to launchpad (plugins).

It turns out that my bzr branches are structured almost the same locally
as they are on my web server, but my plugins don't reflect that at all.
(Because if I checkout ~jameinel/bzr-email/smtplib it goes in
~/.bazaar/plugins/email just like ~robertc/bzr-email/trunk)

So I was thinking that when detecting the 'public_branch', we could
actually start by trying to determine the 'public_branch' of the master
branch.

Which means that rather than saying:

[/home/jameinel/dev/bzr/plugins/email]
public_branch = http://bazaar.launchpad.net/~jameinel/bzr-email/smtplib

And then having to update it whenever I do a checkout, I can do:

[sftp://bazaar.launchpad.net]
public_branch = http://bazaar.launchpad.net
public_branch:policy = appendpath

And now anything I do "bzr checkout sftp://bazaar.launchpad.net/..."
will have the correct public branch set.

Likewise, if I set:
[sftp://bzr.arbash-meinel.com/srv/bzr/public/]
public_branch = http://bzr.arbash-meinel.com/
public_branch:policy = recurse

Then I only have to set up the root of my public locations one time, and
all checkouts from branches underneath there will work.


Now, this doesn't help the case of:
bzr branch http://bazaar.launchpad.net/... project
cd project
bzr push sftp://bazaar.launchpad.net/...


Though it may make a good point for using the 'public_branch' of the
'push_location'.

So the rules would look something like:

1) 'public_branch' @ location
2) 'public_branch' @ master location
3) 'public_branch' @ push location
4) 'public_repository' @ repository location + extra path
    (I don't think this one is as necessary any more because we have
    :policy = appendpath)
5) master location
6) parent location?
7) push location
8) location


Since 'location' is almost always file:///, all of the others are more
likely to be a public location.

Thoughts?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFu204JdeBCYSNAAMRAn8RAJ9nU+gb+J1ICQLAlOJ1NnnWsAztPwCeJJZg
TajFOFbSJKn1PGAmbNMVSDU=
=DHZe
-----END PGP SIGNATURE-----



More information about the bazaar mailing list