[MERGE] FormatRegistry

Aaron Bentley aaron.bentley at utoronto.ca
Wed Jan 3 02:00:58 GMT 2007


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

John Arbash Meinel wrote:
> Aaron Bentley wrote:

>>> There's no legitimate reason to change the default.  The code that does
>>> is old code that is just trying to create a particular format, something
>>>  that is better-handled by doing TestCase.make_branch_and_tree and
>>> supplying a format parameter.
>>>
>>> With the registry in place, I can update the old code, then deprecate
>>> Repository.set_default_format.
> 
> 
> I would think that plugins might want to change the default. You don't
> think so?

What I really meant was "there's no legitimate reason to change the
default after it's been set".  There might be a reason to change it
before we start executing a command, but changing it during execution is
bogus.

A plugin might legitimately want to change the default repository
format, but they might also want to change the default branch format or
default working tree format, or default BzrDir format.  The current API
is inadequate for that; the FormatRegistry will ultimately permit that.

But I can't let them change it via the FormatRegistry until we've done
the deprecation dance with Repository.set_default_format.

TBH, I would rather not have plugins setting the default format.  It
seems risky to me.  But I'm not trying to prevent that, and in the
meantime, Repository.set_default_format does work.

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

iD8DBQFFmw5a0F+nu1YWqI0RAr3lAKCBsfbyxplFKBxuXuiw+6th4pimBgCfU8i3
kZApOoFdgxxCg6T51BZrqC0=
=DpmB
-----END PGP SIGNATURE-----




More information about the bazaar mailing list