~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-03 10:59:42 UTC
  • mfrom: (6461.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20120203105942-zq9f2k9i5a2akbvu
(vila) Merge 2.5 branch (Vincent Ladeuil)

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