[MERGE] ``BZR_LOG=disable`` suppresses writing messages to .bzr.log.
Bernhard Voelker
list at bernhard-voelker.de
Tue Jan 29 08:32:25 GMT 2008
why not let the OS decide what to do with it?
I think
_bzr_log_filename = '/dev/null'
is fully okay - every write to it will be automatically thrown
away by the kernel.
With your solution, we'd make '/dev/null' and 'NUL' magic words,
but from OS side they aren't! They're just character devices
handled by a device driver, in this case the sink.
Bye,
Berny
Alexander Belchenko wrote:
=== modified file 'bzrlib/trace.py'
--- bzrlib/trace.py 2008-01-22 05:00:42 +0000
+++ bzrlib/trace.py 2008-01-28 22:48:19 +0000
@@ -177,6 +177,12 @@
home = os.path.expanduser('~')
_bzr_log_filename = os.path.join(home, '.bzr.log')
else:
+ if sys.platform == 'win32':
+ if tracefilename.lower() == 'nul':
+ return
+ else:
+ if tracefilename == '/dev/null':
+ return
_bzr_log_filename = tracefilename
_bzr_log_filename = os.path.expanduser(_bzr_log_filename)
More information about the bazaar
mailing list