D7980: resourceutil: ensure `_rootpath` is defined under py2exe
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Jan 24 06:43:44 UTC 2020
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Can't even run `hg version` without this.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D7980
AFFECTED FILES
mercurial/utils/resourceutil.py
CHANGE DETAILS
diff --git a/mercurial/utils/resourceutil.py b/mercurial/utils/resourceutil.py
--- a/mercurial/utils/resourceutil.py
+++ b/mercurial/utils/resourceutil.py
@@ -33,6 +33,7 @@
if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
# executable version (py2exe) doesn't support __file__
datapath = os.path.dirname(pycompat.sysexecutable)
+ _rootpath = os.path.dirname(datapath)
else:
datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
_rootpath = os.path.dirname(datapath)
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list