Creating a branch other than master using bzr-git

Jelmer Vernooij jelmer at vernstok.nl
Tue Nov 25 04:06:41 GMT 2008


Hi Eric,

On Mon, Nov 24, 2008 at 09:03:47PM -0500, Eric Anderson wrote:
> Jelmer Vernooij wrote:
> > On Sat, 2008-11-22 at 15:41 -0500, Eric Anderson wrote:
> >> I am new to both bzr and git so bear with me. I am using the bzr-git
> >> plugin to create a branch from a git repository. If I create a bzr
> >> branch with a git repository as the source then it seems to always
> >> branch the "master" branch on the git repository. How do a branch a
> >> different branch other than master?
> > At the moment this is not possible, primarily because a UI (convention)
> > is lacking in bzr to access branches that are not URL-addressable. It's
> > something I hope to add at some point though, but I think we need some
> > API changes to be able to do so.

> Thanks for the information. Seems like the branch could be appended onto
> the URL somehow to indicate what branch. I've seen things like:

> /repos/some_project.git/edge

> Where "edge" is a branch within the git repository. This could obviously
> be confusing though as the code would not know if the last part of the
> URL is a normal directory or a branch indication but it seems like some
> kind of convention like this would work.
The syntax used here should probably be consistent with that used for
multiple branches in the same directory for bazaar itself (which
hasn't been discussed yet). Using slashes seems like a bad idea to me
though; it's ambiguous (what if you have a nested fs branch or a file with
the same name?) and it makes addressing files in the branch confusing
(having to use 'bzr st /foo/branchname/bar' while the file on the file
system is named /foo/bar).

> I have attached a patch. I am a total noob to bzr, git and python (am a
> Ruby developer) so don't know if this is the right thing to do but I
> figure it works for me and one small change can't do to much damage
> right? :)
Yeah, that looks reasonable. I've merged it into the trunk branch.
Thanks!

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081125/d023fc73/attachment.pgp 


More information about the bazaar mailing list