(rfc) list of available log formatters

Alexander Belchenko bialix at ukr.net
Thu Feb 15 14:27:35 GMT 2007


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

Today I run into error with my bzr-config utility.
My utility allows to select default log formatter
to store in bazaar.conf.

In bzr-0.14 and earlier there is global variable
FORMATTERS in log.py. And this variable is not private,
so I assume it could be used by any client of bzrlib.

Now it switch to Registry object with new name
log_formatter_registry. And old name FORMATTERS
is gone.

It's not very good situation for bzr-config utility.
There is no deprecation period for FORMATTERS,
and obviously I miss this change.

Only one safe solution I see is to check existence of
'FORMATTERS' or 'log_formatter_registry' name in log.py.
It's possible for me, but somewhat ugly, IMO.

Why not just name this new Registry object with old name?
i.e. log_formatter_registry => FORMATTERS.
Registry object has dict-like interface, at least
I need only .keys() method.

Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF1G3XzYr338mxwCURApT3AJwKIun8kYEm5CvKb3YJCyz8dNVh0QCfapa6
OrqBqnLLYYMudeyau7U8YiI=
=dMIH
-----END PGP SIGNATURE-----




More information about the bazaar mailing list