tests/hghave.py
branchstable
changeset 1300 bf0c37b32582
parent 1279 9dac69d57f75
child 1301 761641fc16a6
equal deleted inserted replaced
1298:d69c1db7cf8b 1300:bf0c37b32582
   274 def has_msys():
   274 def has_msys():
   275     return os.getenv('MSYSTEM')
   275     return os.getenv('MSYSTEM')
   276 
   276 
   277 def has_aix():
   277 def has_aix():
   278     return sys.platform.startswith("aix")
   278     return sys.platform.startswith("aix")
       
   279 
       
   280 def has_absimport():
       
   281     import __future__
       
   282     from mercurial import util
       
   283     return util.safehasattr(__future__, "absolute_import")
   279 
   284 
   280 checks = {
   285 checks = {
   281     "true": (lambda: True, "yak shaving"),
   286     "true": (lambda: True, "yak shaving"),
   282     "false": (lambda: False, "nail clipper"),
   287     "false": (lambda: False, "nail clipper"),
   283     "baz": (has_baz, "GNU Arch baz client"),
   288     "baz": (has_baz, "GNU Arch baz client"),
   316     "tla": (has_tla, "GNU Arch tla client"),
   321     "tla": (has_tla, "GNU Arch tla client"),
   317     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
   322     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
   318     "windows": (has_windows, "Windows"),
   323     "windows": (has_windows, "Windows"),
   319     "msys": (has_msys, "Windows with MSYS"),
   324     "msys": (has_msys, "Windows with MSYS"),
   320     "aix": (has_aix, "AIX"),
   325     "aix": (has_aix, "AIX"),
       
   326     "absimport": (has_absimport, "absolute_import in __future__"),
   321 }
   327 }