Show More
@@ -370,12 +370,13 b' def hgexecutable():' | |||||
370 | """ |
|
370 | """ | |
371 | if _hgexecutable is None: |
|
371 | if _hgexecutable is None: | |
372 | hg = os.environ.get('HG') |
|
372 | hg = os.environ.get('HG') | |
|
373 | mainmod = sys.modules['__main__'] | |||
373 | if hg: |
|
374 | if hg: | |
374 | _sethgexecutable(hg) |
|
375 | _sethgexecutable(hg) | |
375 | elif mainfrozen(): |
|
376 | elif mainfrozen(): | |
376 | _sethgexecutable(sys.executable) |
|
377 | _sethgexecutable(sys.executable) | |
377 |
elif getattr( |
|
378 | elif os.path.basename(getattr(mainmod, '__file__', '')) == 'hg': | |
378 |
_sethgexecutable( |
|
379 | _sethgexecutable(mainmod.__file__) | |
379 | else: |
|
380 | else: | |
380 | exe = findexe('hg') or os.path.basename(sys.argv[0]) |
|
381 | exe = findexe('hg') or os.path.basename(sys.argv[0]) | |
381 | _sethgexecutable(exe) |
|
382 | _sethgexecutable(exe) |
General Comments 0
You need to be logged in to leave comments.
Login now