We'll want to test for this in the new resource reading API.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
| hg-reviewers |
We'll want to test for this in the new resource reading API.
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/utils/procutil.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 66d0a583bc01 | 2689de960e3d | Gregory Szorc | Mar 2 2019, 12:42 PM |
| returncode = 255 | returncode = 255 | ||||
| except Exception: | except Exception: | ||||
| returncode = 255 | returncode = 255 | ||||
| finally: | finally: | ||||
| # mission accomplished, this child needs to exit and not | # mission accomplished, this child needs to exit and not | ||||
| # continue the hg process here. | # continue the hg process here. | ||||
| os._exit(returncode) | os._exit(returncode) | ||||
| def executablerelativeresources(): | |||||
| """Whether data/resource files are relative to the current executable.""" | |||||
| return mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app' | |||||
| def datapath(): | def datapath(): | ||||
| """Return location of data/resource files that are part of the source.""" | """Return location of data/resource files that are part of the source.""" | ||||
| if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app': | if executablerelativeresources(): | ||||
| # executable version (py2exe) doesn't support __file__ | # executable version (py2exe) doesn't support __file__ | ||||
| return os.path.dirname(pycompat.sysexecutable) | return os.path.dirname(pycompat.sysexecutable) | ||||
| else: | else: | ||||
| return os.path.dirname( | return os.path.dirname( | ||||
| os.path.dirname(pycompat.fsencode(__file__))) | os.path.dirname(pycompat.fsencode(__file__))) | ||||
| class filesystemresourcereader(object): | class filesystemresourcereader(object): | ||||
| """An importlib.abc.ResourceReader that loads from the filesystem. | """An importlib.abc.ResourceReader that loads from the filesystem. | ||||