tests/hghave.py
branchstable
changeset 1100 59a99457aa65
parent 1099 55c85631631b
child 1101 89f984505cbb
equal deleted inserted replaced
1099:55c85631631b 1100:59a99457aa65
    98         return True
    98         return True
    99     except ImportError:
    99     except ImportError:
   100         return False
   100         return False
   101 
   101 
   102 def has_fifo():
   102 def has_fifo():
   103     return getattr(os, "mkfifo", None) is not None
   103     if getattr(os, "mkfifo", None) is None:
       
   104         return False
       
   105     name = tempfile.mktemp(dir='.', prefix=tempprefix)
       
   106     try:
       
   107         os.mkfifo(name)
       
   108         os.unlink(name)
       
   109         return True
       
   110     except OSError:
       
   111         return False
   104 
   112 
   105 def has_cacheable_fs():
   113 def has_cacheable_fs():
   106     from mercurial import util
   114     from mercurial import util
   107 
   115 
   108     fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
   116     fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)