Mercurial > public > mercurial-scm > hg
comparison mercurial/hook.py @ 14941:4a28cb4df1f8
windows: check util.mainfrozen() instead of ad-hoc checks everywhere
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 16:14:02 -0500 |
parents | 58f97dcbd550 |
children | d3bb825ddae3 |
comparison
equal
deleted
inserted
replaced
14939:b4c06b97dfe0 | 14941:4a28cb4df1f8 |
---|---|
26 if d == -1: | 26 if d == -1: |
27 raise util.Abort(_('%s hook is invalid ("%s" not in ' | 27 raise util.Abort(_('%s hook is invalid ("%s" not in ' |
28 'a module)') % (hname, funcname)) | 28 'a module)') % (hname, funcname)) |
29 modname = funcname[:d] | 29 modname = funcname[:d] |
30 oldpaths = sys.path | 30 oldpaths = sys.path |
31 if hasattr(sys, "frozen"): | 31 if util.mainfrozen(): |
32 # binary installs require sys.path manipulation | 32 # binary installs require sys.path manipulation |
33 modpath, modfile = os.path.split(modname) | 33 modpath, modfile = os.path.split(modname) |
34 if modpath and modfile: | 34 if modpath and modfile: |
35 sys.path = sys.path[:] + [modpath] | 35 sys.path = sys.path[:] + [modpath] |
36 modname = modfile | 36 modname = modfile |