Foreign Branches

John Arbash Meinel john at arbash-meinel.com
Tue Oct 18 02:38:18 BST 2005


Martin Pool wrote:
> 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.

That is how I would tend to do it. With something like:

cvs:///path/to/cvs
svn:///path/to/svn
svn://remotehost/path/to/stuff

etc.

Would that work?

John
=:->


> 
> --
> Martin
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051017/321c2369/attachment.pgp 


More information about the bazaar mailing list