##// END OF EJS Templates
codemod: use pycompat.isdarwin...
Jun Wu -
r34648:dacfcdd8 default
parent child Browse files
Show More
@@ -603,7 +603,7 b' def wrapdirstate(orig, self):'
603 603 def extsetup(ui):
604 604 extensions.wrapfilecache(
605 605 localrepo.localrepository, 'dirstate', wrapdirstate)
606 if pycompat.sysplatform == 'darwin':
606 if pycompat.isdarwin:
607 607 # An assist for avoiding the dangling-symlink fsevents bug
608 608 extensions.wrapfunction(os, 'symlink', wrapsymlink)
609 609
@@ -79,7 +79,7 b' def _usercachedir(ui):'
79 79 encoding.environ.get('APPDATA'))
80 80 if appdata:
81 81 return os.path.join(appdata, longname)
82 elif pycompat.sysplatform == 'darwin':
82 elif pycompat.isdarwin:
83 83 home = encoding.environ.get('HOME')
84 84 if home:
85 85 return os.path.join(home, 'Library', 'Caches', longname)
@@ -16,7 +16,7 b' from .. import ('
16 16 pycompat,
17 17 )
18 18
19 if pycompat.sysplatform == 'darwin':
19 if pycompat.isdarwin:
20 20 from . import _osutil
21 21
22 22 ffi = _osutil.ffi
@@ -332,7 +332,7 b' normcasespec = encoding.normcasespecs.lo'
332 332 # fallback normcase function for non-ASCII strings
333 333 normcasefallback = normcase
334 334
335 if pycompat.sysplatform == 'darwin':
335 if pycompat.isdarwin:
336 336
337 337 def normcase(path):
338 338 '''
@@ -46,7 +46,7 b' def systemrcpath():'
46 46 def userrcpath():
47 47 if pycompat.sysplatform == 'plan9':
48 48 return [encoding.environ['home'] + '/lib/hgrc']
49 elif pycompat.sysplatform == 'darwin':
49 elif pycompat.isdarwin:
50 50 return [os.path.expanduser('~/.hgrc')]
51 51 else:
52 52 confighome = encoding.environ.get('XDG_CONFIG_HOME')
@@ -677,8 +677,8 b' def _plainapplepython():'
677 677 for using system certificate store CAs in addition to the provided
678 678 cacerts file
679 679 """
680 if (pycompat.sysplatform != 'darwin' or
681 util.mainfrozen() or not pycompat.sysexecutable):
680 if (not pycompat.isdarwin or util.mainfrozen() or
681 not pycompat.sysexecutable):
682 682 return False
683 683 exe = os.path.realpath(pycompat.sysexecutable).lower()
684 684 return (exe.startswith('/usr/bin/python') or
@@ -736,7 +736,7 b' def _defaultcacerts(ui):'
736 736
737 737 # The Apple OpenSSL trick isn't available to us. If Python isn't able to
738 738 # load system certs, we're out of luck.
739 if pycompat.sysplatform == 'darwin':
739 if pycompat.isdarwin:
740 740 # FUTURE Consider looking for Homebrew or MacPorts installed certs
741 741 # files. Also consider exporting the keychain certs to a file during
742 742 # Mercurial install.
@@ -1561,7 +1561,7 b' def splitpath(path):'
1561 1561
1562 1562 def gui():
1563 1563 '''Are we running in a GUI?'''
1564 if pycompat.sysplatform == 'darwin':
1564 if pycompat.isdarwin:
1565 1565 if 'SSH_CONNECTION' in encoding.environ:
1566 1566 # handle SSH access to a box where the user is logged in
1567 1567 return False
General Comments 0
You need to be logged in to leave comments. Login now