equal
deleted
inserted
replaced
967 |
967 |
968 Defaults to $HG or 'hg' in the search path. |
968 Defaults to $HG or 'hg' in the search path. |
969 """ |
969 """ |
970 if _hgexecutable is None: |
970 if _hgexecutable is None: |
971 hg = encoding.environ.get('HG') |
971 hg = encoding.environ.get('HG') |
972 mainmod = sys.modules['__main__'] |
972 mainmod = sys.modules[pycompat.sysstr('__main__')] |
973 if hg: |
973 if hg: |
974 _sethgexecutable(hg) |
974 _sethgexecutable(hg) |
975 elif mainfrozen(): |
975 elif mainfrozen(): |
976 if getattr(sys, 'frozen', None) == 'macosx_app': |
976 if getattr(sys, 'frozen', None) == 'macosx_app': |
977 # Env variable set by py2app |
977 # Env variable set by py2app |