tests/hghave.py
branchstable
changeset 1303 94e35118a756
parent 1301 761641fc16a6
child 1311 1fed120bfa04
equal deleted inserted replaced
1301:761641fc16a6 1303:94e35118a756
   230             if mode & 0777 != ~umask & 0666:
   230             if mode & 0777 != ~umask & 0666:
   231                 return False
   231                 return False
   232         return True
   232         return True
   233     finally:
   233     finally:
   234         os.rmdir(d)
   234         os.rmdir(d)
       
   235 
       
   236 def has_root():
       
   237     return os.geteuid() == 0
   235 
   238 
   236 def has_pyflakes():
   239 def has_pyflakes():
   237     return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",
   240     return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",
   238                        r"<stdin>:1: 're' imported but unused",
   241                        r"<stdin>:1: 're' imported but unused",
   239                        True)
   242                        True)
   310     "mtn": (has_mtn, "monotone client (>= 1.0)"),
   313     "mtn": (has_mtn, "monotone client (>= 1.0)"),
   311     "outer-repo": (has_outer_repo, "outer repo"),
   314     "outer-repo": (has_outer_repo, "outer repo"),
   312     "p4": (has_p4, "Perforce server and client"),
   315     "p4": (has_p4, "Perforce server and client"),
   313     "pyflakes": (has_pyflakes, "Pyflakes python linter"),
   316     "pyflakes": (has_pyflakes, "Pyflakes python linter"),
   314     "pygments": (has_pygments, "Pygments source highlighting library"),
   317     "pygments": (has_pygments, "Pygments source highlighting library"),
       
   318     "root": (has_root, "root permissions"),
   315     "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
   319     "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
   316     "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
   320     "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
   317     "svn": (has_svn, "subversion client and admin tools"),
   321     "svn": (has_svn, "subversion client and admin tools"),
   318     "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
   322     "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
   319     "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
   323     "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),