mercurial/util.py
changeset 43672 9fb85668ee15
parent 43671 664e24207728
child 43673 f0bee3b1b847
--- a/mercurial/util.py	Thu Nov 14 11:52:22 2019 -0800
+++ b/mercurial/util.py	Thu Nov 14 12:33:10 2019 -0800
@@ -1823,13 +1823,7 @@
     return pycompat.ossep.join(([b'..'] * len(a)) + b) or b'.'
 
 
-# the location of data files matching the source code
-if resourceutil.mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
-    # executable version (py2exe) doesn't support __file__
-    datapath = os.path.dirname(pycompat.sysexecutable)
-else:
-    datapath = os.path.dirname(pycompat.fsencode(__file__))
-
+datapath = resourceutil.datapath
 i18n.setdatapath(datapath)