changeset 44136:a90039b07343 stable

resourceutil: ensure `_rootpath` is defined under py2exe Can't even run `hg version` without this. Differential Revision: https://phab.mercurial-scm.org/D7980
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 24 Jan 2020 01:11:19 -0500
parents ae596fac8ba0
children e4344e463c0c
files mercurial/utils/resourceutil.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/resourceutil.py	Tue Jan 21 17:15:34 2020 -0800
+++ b/mercurial/utils/resourceutil.py	Fri Jan 24 01:11:19 2020 -0500
@@ -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)