Comments
Patch
@@ -1561,7 +1561,7 @@
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
@@ -736,7 +736,7 @@
# 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.
@@ -46,7 +46,7 @@
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')
@@ -332,7 +332,7 @@
# fallback normcase function for non-ASCII strings
normcasefallback = normcase
-if pycompat.sysplatform == 'darwin':
+if pycompat.isdarwin:
def normcase(path):
'''
@@ -16,7 +16,7 @@
pycompat,
)
-if pycompat.sysplatform == 'darwin':
+if pycompat.isdarwin:
from . import _osutil
ffi = _osutil.ffi
@@ -80,7 +80,7 @@
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)
@@ -603,7 +603,7 @@
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)