diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py --- a/hgext/fsmonitor/__init__.py +++ b/hgext/fsmonitor/__init__.py @@ -603,7 +603,7 @@ def wrapdirstate(orig, self): def extsetup(ui): extensions.wrapfilecache( localrepo.localrepository, 'dirstate', wrapdirstate) - if pycompat.sysplatform == 'darwin': + if pycompat.isdarwin: # An assist for avoiding the dangling-symlink fsevents bug extensions.wrapfunction(os, 'symlink', wrapsymlink) diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -79,7 +79,7 @@ def _usercachedir(ui): encoding.environ.get('APPDATA')) if appdata: return os.path.join(appdata, longname) - elif pycompat.sysplatform == 'darwin': + elif pycompat.isdarwin: home = encoding.environ.get('HOME') if home: return os.path.join(home, 'Library', 'Caches', longname) diff --git a/mercurial/cffi/osutil.py b/mercurial/cffi/osutil.py --- a/mercurial/cffi/osutil.py +++ b/mercurial/cffi/osutil.py @@ -16,7 +16,7 @@ from .. import ( pycompat, ) -if pycompat.sysplatform == 'darwin': +if pycompat.isdarwin: from . import _osutil ffi = _osutil.ffi diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -332,7 +332,7 @@ normcasespec = encoding.normcasespecs.lo # fallback normcase function for non-ASCII strings normcasefallback = normcase -if pycompat.sysplatform == 'darwin': +if pycompat.isdarwin: def normcase(path): ''' diff --git a/mercurial/scmposix.py b/mercurial/scmposix.py --- a/mercurial/scmposix.py +++ b/mercurial/scmposix.py @@ -46,7 +46,7 @@ def systemrcpath(): def userrcpath(): if pycompat.sysplatform == 'plan9': return [encoding.environ['home'] + '/lib/hgrc'] - elif pycompat.sysplatform == 'darwin': + elif pycompat.isdarwin: return [os.path.expanduser('~/.hgrc')] else: confighome = encoding.environ.get('XDG_CONFIG_HOME') diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py --- a/mercurial/sslutil.py +++ b/mercurial/sslutil.py @@ -677,8 +677,8 @@ def _plainapplepython(): for using system certificate store CAs in addition to the provided cacerts file """ - if (pycompat.sysplatform != 'darwin' or - util.mainfrozen() or not pycompat.sysexecutable): + if (not pycompat.isdarwin or util.mainfrozen() or + not pycompat.sysexecutable): return False exe = os.path.realpath(pycompat.sysexecutable).lower() return (exe.startswith('/usr/bin/python') or @@ -736,7 +736,7 @@ def _defaultcacerts(ui): # The Apple OpenSSL trick isn't available to us. If Python isn't able to # load system certs, we're out of luck. - if pycompat.sysplatform == 'darwin': + if pycompat.isdarwin: # FUTURE Consider looking for Homebrew or MacPorts installed certs # files. Also consider exporting the keychain certs to a file during # Mercurial install. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1561,7 +1561,7 @@ def splitpath(path): def gui(): '''Are we running in a GUI?''' - if pycompat.sysplatform == 'darwin': + if pycompat.isdarwin: if 'SSH_CONNECTION' in encoding.environ: # handle SSH access to a box where the user is logged in return False