Foreign Branches
Martin Pool
martinpool at gmail.com
Tue Oct 18 02:33:43 BST 2005
On 18/10/05, Jelmer Vernooij <jelmer at samba.org> wrote:
> The past few days I've been looking at implementing support for
> foreign branches (http://bazaar.canonical.com/BzrForeignBranches), in
> particular with Subversion in mind.
>
> I've put up a branch that includes support for registering custom
> branch types at http://jelmer.vernstok.nl/bzr/foreignbranch; the diff
> between this branch and bzr.dev is attached. This basically adds a
> hook in the open() and open_containing() functions of the Branch class
> so that it first tries to open a URL with the "native" bzr Branch
> class and if that doesn't work (raises a NotBranchError) tries with
> the other registered branch types (such as SvnBranch, CvsBranch,
> BazBranch, etc).
>
> Is the right approach? Would it make more sense if I merged the open()
> and open_containing() function of _Branch into __init__() ? Please
> comment.
Hi,
Foreign branches are an interesting idea.
We used to have more different cases handled by Branch(), and decided
it was better to separate them into factory functions.
Perhaps rather than specifying the type as a parameter it'd be better
to give a URL and parse the scheme part.
--
Martin
More information about the bazaar
mailing list