Pithy answer to "Why set a public branch?"
Colin D Bennett
colin at gibibit.com
Sat Feb 21 22:49:37 GMT 2009
On Sun, 22 Feb 2009 09:30:32 +1100
Jonathan Lange <jml at mumak.net> wrote:
> Hello,
>
> I recently blogged[1] about the launchpad-open command, and have since
> received two bug reports (Blogger is the new Launchpad!). Both of them
> relate to not having public branch locations set.
The “public branch” is useful because this location is referenced in
merge directives that “bzr send” creates. Then, even though you
may have created the merge directive from a branch on your local
machine, if you pushed a public copy of the branch somewhere and
specified that location as the “public branch” argument to “bzr send”,
then recipients of the merge directive can browse the public branch you
published.
Alternately, if you include a public branch in the merge directive, you
can actually omit the bundle of revision data from the merge directive
(bzr send --no-bundle). This is useful when you have an enormous
change that would be too big to send over email, for instance. From
”bzr help send”:
If --no-bundle is specified, then public_branch is needed (and must be
up-to-date), so that the receiver can perform the merge using the
public_branch. The public_branch is always included if known, so that
people can check it later.
I think better documentation is needed for ”bzr send”, merge
directives, and bundles. I've had to figure out with some effort what
the meaning of ”source branch”, “target branch”, “public branch”, and
“submit branch” all really mean, though maybe it's obvious to most
people.
I prefer to always include the bundle in the merge directive, to make
it more self-contained. (I'd like to be able to apply a merge directive
without an internet connection if I have a local copy of the target
branch, for instance, but I'm not sure if this is currently possible.)
In your specific case, using the “public branch” to infer the
Launchpad page for a local branch may not be the best option. For
checkouts, of course you could look at the bound branch URL which is
likely be a Launchpad branch URL, if, for instance, the user did “bzr
checkout lp:qbzr”. For standalone branches (e.g., made with ”bzr
branch lp:qbzr”), the ”parent branch” field will be set to the
Launchpad branch location. You could use that if it's not a checkout
of a Launchpad branch.
Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090221/601dc102/attachment.pgp
More information about the bazaar
mailing list