~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-02 14:29:12 UTC
  • mfrom: (6437.23.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120202142912-3nmwuq16po3104u2
MergeĀ 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
 
195
195
 
196
196
def _get_bzr_log_filename():
197
 
    bzr_log = os.environ.get('BZR_LOG')
 
197
    bzr_log = osutils.path_from_environ('BZR_LOG')
198
198
    if bzr_log:
199
199
        return bzr_log
200
 
    home = os.environ.get('BZR_HOME')
 
200
    home = osutils.path_from_environ('BZR_HOME')
201
201
    if home is None:
202
 
        if sys.platform == 'win32':
203
 
            from bzrlib import win32utils
204
 
            home = win32utils.get_home_location()
205
 
        else:
206
 
            home = os.path.expanduser('~')
 
202
        # GZ 2012-02-01: Logging to the home dir is bad, but XDG is unclear
 
203
        #                over what would be better. On windows, bug 240550
 
204
        #                suggests LOCALAPPDATA be used instead.
 
205
        home = osutils._get_home_dir()
207
206
    return os.path.join(home, '.bzr.log')
208
207
 
209
208