[RFC] support for plugins to implement their own log formatters
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Feb 3 21:22:53 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Erik Bågfors wrote:
> in log.py, created "register_formatter" and "set_default_formatter"
> that plugins can use to do register and change the default. Changed
> how default formatter was choosen. This all felt like no-brainers...
I don't know about set_default_formatter. AFICT, its purpose is to
allow plugins to control the setting, but a user may have a plugin
installed without wanting to change their default.
Are you doing this because you're concerned about having to set the
defaults separately for each command that uses log formatters? I
certainly don't have a problem with a global log-formatter-default option.
> I also added another command line option to select with formatter to
> use. I called it "log-format" for now. So you can use "bzr log
> --log-format short" to do the same thing as "bzr log --short".
> --short is still supported. Now a new plugin can register a formatter
> "foo" and you can use "--log-format foo" to use it.
>
> I'm not 100% happy about this command line option, but at least it
> works as expected. You now have both --long, --line, --short, and
> --log-format ARG. That's not really good.
This goes back to my earlier post about how we should support
enumeration command-line options. (which you already knew from IRC)
It looks like you haven't covered all the commands that use log
formatters in this patch.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD48mt0F+nu1YWqI0RAmtNAJ9tCkeoy2xThtF9u1S4DKroVMrZAgCfZboV
QPsSjKzpfHZlu1quwm0c+nw=
=UXfA
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list