builtins: self.outf.write vs trace.note

Aaron Bentley aaron at aaronbentley.com
Fri Nov 13 01:43:59 GMT 2009


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

Gordon Tyler wrote:
> So in the process of fixing bug #271790, I noticed that most of the
> other builtin commands use self.outf.write instead of trace.note (or an
> appropriate trace function). I was wondering if this is intentional or
> should I fix them to use trace.note?

trace.note and self.outf.write are both appropriate, depending on
context.  Output about the process of executing the command, e.g. "using
saved branch location" should be written using trace.note, and where
it's not, patches are welcome.  Output which is the primary
functionality of a command, such as the output of "bzr diff" should be
written using self.outf, and this should not be changed.

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

iEYEARECAAYFAkr8udoACgkQ0F+nu1YWqI0WJgCfYz7dl7NQry3m9c9ubJCttpYp
06oAn34Vnw26oHX5/AmH/Et1M1LESr/W
=pdMj
-----END PGP SIGNATURE-----



More information about the bazaar mailing list