mercurial/util.py
changeset 43672 9fb85668ee15
parent 43671 664e24207728
child 43673 f0bee3b1b847
equal deleted inserted replaced
43671:664e24207728 43672:9fb85668ee15
  1821         b.pop()
  1821         b.pop()
  1822     b.reverse()
  1822     b.reverse()
  1823     return pycompat.ossep.join(([b'..'] * len(a)) + b) or b'.'
  1823     return pycompat.ossep.join(([b'..'] * len(a)) + b) or b'.'
  1824 
  1824 
  1825 
  1825 
  1826 # the location of data files matching the source code
  1826 datapath = resourceutil.datapath
  1827 if resourceutil.mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
       
  1828     # executable version (py2exe) doesn't support __file__
       
  1829     datapath = os.path.dirname(pycompat.sysexecutable)
       
  1830 else:
       
  1831     datapath = os.path.dirname(pycompat.fsencode(__file__))
       
  1832 
       
  1833 i18n.setdatapath(datapath)
  1827 i18n.setdatapath(datapath)
  1834 
  1828 
  1835 
  1829 
  1836 def checksignature(func):
  1830 def checksignature(func):
  1837     '''wrap a function with code to check for calling errors'''
  1831     '''wrap a function with code to check for calling errors'''