~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Alexander Belchenko
  • Date: 2007-01-24 19:42:26 UTC
  • mfrom: (2234.3.5 0.14)
  • mto: This revision was merged to the branch mainline in revision 2243.
  • Revision ID: bialix@ukr.net-20070124194226-rl1rlatr3jc5cvhh
merge latest fixes from bzr.0.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    osutils,
78
78
    symbol_versioning,
79
79
    urlutils,
80
 
    win32utils,
81
80
    )
82
81
import bzrlib.util.configobj.configobj as configobj
83
82
""")
710
709
    base = os.environ.get('BZR_HOME', None)
711
710
    if sys.platform == 'win32':
712
711
        if base is None:
713
 
            base = win32utils.get_appdata_location_unicode()
 
712
            base = os.environ.get('APPDATA', None)
714
713
        if base is None:
715
714
            base = os.environ.get('HOME', None)
716
715
        if base is None:
756
755
    """
757
756
    import socket
758
757
 
759
 
    if sys.platform == 'win32':
760
 
        name = win32utils.get_user_name_unicode()
761
 
        if name is None:
762
 
            raise errors.BzrError("Cannot autodetect user name.\n"
763
 
                                  "Please, set your name with command like:\n"
764
 
                                  'bzr whoami "Your Name <name@domain.com>"')
765
 
        host = win32utils.get_host_name_unicode()
766
 
        if host is None:
767
 
            host = socket.gethostname()
768
 
        return name, (name + '@' + host)
 
758
    # XXX: Any good way to get real user name on win32?
769
759
 
770
760
    try:
771
761
        import pwd