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