hghave: reorder check functions and entries
authorPatrick Mezard <pmezard@gmail.com>
Sun, 07 Oct 2007 18:58:36 +0200
changeset 5409 190c234c8fa0
parent 5408 36794dbe66a3
child 5410 2daecf3d2582
hghave: reorder check functions and entries
tests/hghave
--- a/tests/hghave	Sun Oct 07 15:13:50 2007 +0200
+++ b/tests/hghave	Sun Oct 07 18:58:36 2007 +0200
@@ -21,18 +21,21 @@
     ret = fh.close()
     return (ignorestatus or ret is None) and r.search(s)
 
-def has_symlink():
-    return hasattr(os, "symlink")
-
-def has_fifo():
-    return hasattr(os, "mkfifo")
-
 def has_cvs():
     return matchoutput('cvs --version 2>&1', r'Concurrent Versions System')
 
 def has_cvsps():
     return matchoutput('cvsps -h -q 2>&1', r'cvsps version', True)
 
+def has_eol_in_paths():
+    try:
+        fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
+        os.close(fd)
+        os.remove(path)
+        return True
+    except:
+        return False
+
 def has_executablebit():
     fd, path = tempfile.mkstemp(prefix=tempprefix)
     os.close(fd)
@@ -43,14 +46,8 @@
     finally:
         os.remove(path)
 
-def has_eol_in_paths():
-    try:
-        fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
-        os.close(fd)
-        os.remove(path)
-        return True
-    except:
-        return False
+def has_fifo():
+    return hasattr(os, "mkfifo")
 
 def has_hotshot():
     try:
@@ -82,13 +79,16 @@
     except ImportError:
         return False
 
+def has_symlink():
+    return hasattr(os, "symlink")
+
 checks = {
     "cvs": (has_cvs, "cvs client"),
     "cvsps": (has_cvsps, "cvsps utility"),
     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
     "execbit": (has_executablebit, "executable bit"),
+    "fifo": (has_fifo, "named pipes"),
     "git": (has_git, "git command line client"),
-    "fifo": (has_fifo, "named pipes"),
     "hotshot": (has_hotshot, "python hotshot module"),
     "lsprof": (has_lsprof, "python lsprof module"),
     "svn": (has_svn, "subversion client and admin tools"),