Creating a branch other than master using bzr-git
Jelmer Vernooij
jelmer at samba.org
Mon Dec 1 17:13:00 GMT 2008
On Mon, 2008-12-01 at 12:03 -0500, Eric Anderson wrote:
> John Arbash Meinel wrote:
> (replace # with whatever character you think has the least problems).
> But as others have pointed out there doesn't seem to be many characters
> that lack some sort of problem. So perhaps some other type of
> un-official interface is needed. What about an environment variable? i.e.
>
> BRANCH=edge bzr branch http://example.com/foo.git
>
> This has the following advantages:
>
> * It doesn't mess with the official interface any so interacting with
> a normal bzr repository is not complicated in any way,
> * Each plugin can determine whatever environment variables it would
> like to use to help it map the concepts correctly. So since SVN
> also equate a URI to a branch it would not need to support the
> BRANCH environment variable. But another SCM that works like git
> might use the BRANCH environment variable. i.e. each plugin could
> choose whatever un-official UI made the most sense for interacting
> with the foreign repository (although plugins with similar mapping
> concepts should be encouraged to use similar environment variable
> names for consistency).
> * Avoids all encoding/escaping issues previously discussed
> * Easy for a plugin to implement. bzr-git could support accessing
> branches other than master on a bare repository fairly soon.
I think we do need an official way of dealing with this as there are
several cases when we do have more than one branch per directory in
Bazaar, although they aren't very common yet (the looms and
local-branches plugins both allow multiple branches).
An environment variable is clumsy for this sort of thing imho, since it
doesn't specify which location the variable is referring to. What if you
want push from one git branch to another? It is also not very
discoverable for users.
The URL really is the best place for this sort of thing, we just have to
decide upon the syntax.
Cheers,
Jelmer
--
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
More information about the bazaar
mailing list