bzrlib.bzrdir.format_registry.set_default() cannot be called twice
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
We currently use format_
format should be the default.
Someone asked on IRC how to switch the default to dirstate-tags, so my
first thought was to do this in a plugin:
import bzrlib.bzrdir
bzrlib.
That failed because it is actually registering the format "default", and
that format has already been registered.
The workaround is to add
bzrlib.
before the set_default() call.
To me, it seems more reasonable to either:
1) have 'set_default' check if default is already registered and remove it.
2) Have 'set_default' use the default logic that Registry already has.
(you can use registry.get(None) to get the default object, rather than
using a key like 'default').
This would mean you don't have 'default' registered
affects /products/bzr
importance low
status confirmed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFGQNWyJde
MTZOGHERySmK27b
=kD6H
-----END PGP SIGNATURE-----