[MERGE][0.19] Fix passing tracefilename to bzrlib.open_tracefile
Andrew Bennetts
andrew at canonical.com
Thu Aug 9 03:19:01 BST 2007
Currently, if you pass the 'tracefilename' argument to bzrlib.open_tracefile,
you get an exception. This simple bundle fixes that. It was working in 0.17,
I haven't checked 0.18.
This is a useful feature if you want to get logging when using bzrlib outside of
the 'bzr' executable, and don't want to direct it to ~/.bzr.log.
Unfortunately, with the current structure of bzrlib/trace.py, it is very
difficult to test this code path, so I have only tested this manually.
I think this is simple enough that it should go into 0.19, especially as it is a
regression.
-Andrew.
-------------- next part --------------
# Bazaar merge directive format 2 (Bazaar 0.19)
# revision_id: andrew.bennetts at canonical.com-20070809011436-\
# gdrflmle4tsc00kl
# target_branch: http://bazaar-vcs.org/bzr/bzr.dev
# testament_sha1: 2266dc20e699a6c6fdd878b6323794e564b5255d
# timestamp: 2007-08-09 11:14:50 +1000
# source_branch: http://people.ubuntu.com/~andrew/bzr/tracefilename-\
# fix
# base_revision_id: pqm at pqm.ubuntu.com-20070808055516-ml9ucjsb4idmpmww
#
# Begin patch
=== modified file 'bzrlib/trace.py'
--- bzrlib/trace.py 2007-07-02 04:48:41 +0000
+++ bzrlib/trace.py 2007-08-09 01:14:36 +0000
@@ -152,6 +152,8 @@
else:
home = os.path.expanduser('~')
_bzr_log_filename = os.path.join(home, '.bzr.log')
+ else:
+ _bzr_log_filename = tracefilename
_bzr_log_filename = os.path.expanduser(_bzr_log_filename)
_rollover_trace_maybe(_bzr_log_filename)
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWQydfmYAAehfgGQQUev//3//
/7C////wUAR9PaAMWhtgCGpomin6mGpPEaJ6RiZP1EHpD1Gmmhp5QHpoQBxkyaMQ00MBNDE0aZMQ
MjCaNNMIMmOMmTRiGmhgJoYmjTJiBkYTRpphBkwkkqfqT0m9UxNqfpBNGR6mTIABoaaAaNAAEkhN
AJ6mETAmQTSfpGUeU9RhPSaNMI2U2po+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