hgext/largefiles/lfutil.py
changeset 34641 bb6544b1c56e
parent 34344 ac0cd81e2f83
child 34645 75979c8d4572
equal deleted inserted replaced
34640:68ed3b4f86ef 34641:bb6544b1c56e
    10 from __future__ import absolute_import
    10 from __future__ import absolute_import
    11 
    11 
    12 import copy
    12 import copy
    13 import hashlib
    13 import hashlib
    14 import os
    14 import os
    15 import platform
       
    16 import stat
    15 import stat
    17 
    16 
    18 from mercurial.i18n import _
    17 from mercurial.i18n import _
    19 
    18 
    20 from mercurial import (
    19 from mercurial import (
    78     if pycompat.osname == 'nt':
    77     if pycompat.osname == 'nt':
    79         appdata = encoding.environ.get('LOCALAPPDATA',\
    78         appdata = encoding.environ.get('LOCALAPPDATA',\
    80                         encoding.environ.get('APPDATA'))
    79                         encoding.environ.get('APPDATA'))
    81         if appdata:
    80         if appdata:
    82             return os.path.join(appdata, longname)
    81             return os.path.join(appdata, longname)
    83     elif platform.system() == 'Darwin':
    82     elif pycompat.sysplatform == 'darwin':
    84         home = encoding.environ.get('HOME')
    83         home = encoding.environ.get('HOME')
    85         if home:
    84         if home:
    86             return os.path.join(home, 'Library', 'Caches', longname)
    85             return os.path.join(home, 'Library', 'Caches', longname)
    87     elif pycompat.osname == 'posix':
    86     elif pycompat.osname == 'posix':
    88         path = encoding.environ.get('XDG_CACHE_HOME')
    87         path = encoding.environ.get('XDG_CACHE_HOME')