~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Vincent Ladeuil
  • Date: 2012-02-14 17:22:37 UTC
  • mfrom: (6466 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120214172237-7dv7er3n4uy8d5m4
Merge trunk

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