[RFC] Repository copies

Aaron Bentley aaron.bentley at utoronto.ca
Thu Dec 21 14:17:40 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:

> Yeah, but it's the way Subversion looks at repositories - that was the
> point I was trying to make.

Sure.  (I've gotten some experience with Subversion's POV from the Trac
plugin.)

I've no complaint with trying to accelerate the "mirror all branches
under this location" operation, I was just trying to clarify that in the
bzr model, that's different from "mirror all branches that use this repo".

> Ok, so the find_branches() function for the sort of thing I'd like to do
> should happen at a different level. What's the most appropriate place
> for it while still allowing overriding that function for specific
> situations like that of svn ?

It seems like the BzrDir is a good place to hang it, e.g.

BzrDir.find_branches_under()

But there should be a function-call interface to it, so that you can
start at a directory that has no bzrdir:

def find_branches_under(transport):
    try:
        mydir = BzrDir.open_from_transport(transport)
        try:
            yield mydir.open_branch()
        except NotBranchError:
            pass
        for result in mydir.find_branches_under():
            yield result
    except NotBranchError:
        for child in transport.list(''):
            for result in find_branches_under(transport.clone(child)):
                yield result

What do you think?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFipeE0F+nu1YWqI0RAqBBAJoCa7osutDc6IunuumAEgwkbqEvrQCeLAE6
gWU0xol/60KdU/SffU3YGYI=
=tQeX
-----END PGP SIGNATURE-----




More information about the bazaar mailing list