[MERGE] ``BZR_LOG=disable`` suppresses writing messages to .bzr.log.

John Arbash Meinel john at arbash-meinel.com
Thu Feb 7 06:01:13 GMT 2008


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

Alexander Belchenko wrote:
| John Arbash Meinel ?8H5B:
| | Alexander Belchenko wrote:
| |> Ian Clatworthy ?8H5B:
| |>> Alexander Belchenko wrote:
| |>>> Here is another version.
| |>>> $BZR_LOG used to specify path for .bzr.log.
| |>>> If $BZR_LOG is /dev/null (Linux) or NUL (Windows) we are suppress
log.
| |>>
| |>> bb:tweak
| |>>
| |>> The approach and code are fine IMO.
| |>>
| |>> My only suggestion is that the one line of help added to
| |>> help_topics/__init__.py be expanded to 2 ala BZR_HOME. As the help
| |>> currently reads, a naive user might think that specifying /dev/null or
| |>> NUL suppresses the log, regardless of OS.
| |>
| |> Here is final version of my patch, with blackbox tests for version
| |> command,
| |> and tweaked help topic. Also I follow suggestion to use /dev/null
or NUL
| |> as real filenames. I hope their impact on performance is really
| |> negligible.
| |>
| |
| | You don't actually assert that 'my.bzr.log' actually contains the logged
| | info, just that 'bzr --version' reports it.
| |
| | I would like to see that ~/.bzr.log is empty/nonexistant and that
| | my.bzr.log does contain data. I don't think we need to test that "NUL"
| | doesn't. :)
|
| I don't understand how I can test that ~/.bzr.log is "empty/nonexistant"
| if it
| always exists by default. You suggest my test will kill this file?
| Testing existence of my.bzr.log is no problem.

Every test gets a new $HOME directory, and thus a new .bzr.log. I don't
know if it already exists by the time your test points it somewhere
else. If it does, you could just test that its size stays the same.

I would just like some sort of proof that we aren't actually writing to
that file.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHqp6oJdeBCYSNAAMRAhrPAKCTIIvcWN4B3L9bR6DiSG/t6ec02QCfRN5n
B9W2DwM7qK4+Q8h/2HKqAKg=
=6Qb3
-----END PGP SIGNATURE-----



More information about the bazaar mailing list