# HG changeset patch # User Matt Harbison # Date 2020-01-24 06:11:19 # Node ID a90039b07343b25964ec9bd968cd5d94c5c3589d # Parent ae596fac8ba072823ca9548b5360caa32a5d4840 resourceutil: ensure `_rootpath` is defined under py2exe Can't even run `hg version` without this. Differential Revision: https://phab.mercurial-scm.org/D7980 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 @@ def mainfrozen(): 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)