[merge] split out repository formats
Martin Pool
mbp at sourcefrog.net
Wed Feb 14 07:27:16 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
> Martin Pool wrote:
>> OK so here's an updated version.
>
> I really wish this hadn't gone in so soon. It's going to play havoc
> with by-reference-trees, which introduces a new repository format.
I know there might be textual clashes but the interface required of a
new Repository format is still very similar. You don't even need
strictly need to move it, though that would be more consistent.
>> @@ -1987,18 +1987,29 @@
>> e.g. BzrDirMeta1 with weave repository. Also, it's more user-oriented.
>> """
>
>> - def register_metadir(self, key, repo, help, native=True, deprecated=False):
>> + def register_metadir(self, key, repo, help, native=True, deprecated=False,
>> + repo_module='bzrlib.repository'):
>
> I think this is a poor choice, because by the time branch6 and
> by-reference trees go in, it's going to look like this:
>
> def register_metadir(self, key, repo, help, native=True,
> deprecated=False,
> repo_module='bzrlib.repository',
> branch_format=None,
> workingtree_format=None):
>
> And by extension, it would turn into
>
> def register_metadir(self, key, repo, help, native=True,
> deprecated=False,
> repo_module='bzrlib.repository',
> branch_format=None,
> branch_module='bzrlib.branch',
> workingtree_format=None,
> workingtree_module='bzrlib.workingtree'):
>
> I think it would be better if register_metadir could take
> fully-qualified class names instead, i.e.
>
> register_metadir('knit', 'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
> 'Knit format 1'
> branch_format='bzrlib.branch.BranchFormat5',
> workingtree_format='bzrlib.workingtree.WorkingTreeFormat3')
I think you're right. I will put in an additional change so that repo
can contain the fully-qualified class name. This is a bit incompatible
with the previous usage, but I think the only code it can break is code
that registers new metadir formats by inserting their class into
bzrlib.repository, which is a bit complex.
- --
Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF0rnUPGPKP6Cz6IsRAjXuAJ94vahKjTeKfT/9c5uR2mMKD7bwAQCfT4p+
3MiIYMj4iteEtr5XSQyIJVM=
=kCGd
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list