~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/version.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Report on version of bzrlib"""
18
18
 
19
 
from __future__ import absolute_import
20
 
 
21
19
import os
22
20
import sys
23
21
 
24
22
import bzrlib
25
23
from bzrlib import (
 
24
    bzrdir,
26
25
    config,
27
 
    controldir,
28
26
    errors,
29
27
    osutils,
30
28
    trace,
75
73
    else:
76
74
        to_file.write(bzrlib.__path__[0] + '\n')
77
75
    if show_config:
78
 
        config_dir = osutils.normpath(config.config_dir())  # use native slashes
 
76
        config_dir = os.path.normpath(config.config_dir())  # use native slashes
79
77
        if not isinstance(config_dir, unicode):
80
78
            config_dir = config_dir.decode(osutils.get_user_encoding())
81
79
        to_file.write("  Bazaar configuration: %s\n" % (config_dir,))
100
98
    If bzr is not being run from its working tree, returns None.
101
99
    """
102
100
    try:
103
 
        control = controldir.ControlDir.open_containing(__file__)[0]
 
101
        control = bzrdir.BzrDir.open_containing(__file__)[0]
104
102
        return control.open_workingtree(recommend_upgrade=False)
105
103
    except (errors.NotBranchError, errors.UnknownFormatError,
106
104
            errors.NoWorkingTree):