diff mercurial/util.py @ 6743:86e8187b721a

simplify flag handling add _checklink var to dirstate introduce dirstate.flagfunc switch users of util.execfunc/linkfunc to flagfunc change manifestdict.set to take a flags string change ctx.fileflags to ctx.flags change gitmode func to a dict remove util.execfunc/linkfunc
author Matt Mackall <mpm@selenic.com>
date Thu, 26 Jun 2008 13:46:34 -0500
parents 33045179d079
children 1dca460e7d1e
line wrap: on
line diff
--- a/mercurial/util.py	Thu Jun 26 13:46:33 2008 -0500
+++ b/mercurial/util.py	Thu Jun 26 13:46:34 2008 -0500
@@ -933,12 +933,6 @@
         return False
     return not (new_file_has_exec or exec_flags_cannot_flip)
 
-def execfunc(path, fallback):
-    '''return an is_exec() function with default to fallback'''
-    if checkexec(path):
-        return lambda x: is_exec(os.path.join(path, x))
-    return fallback
-
 def checklink(path):
     """check whether the given path is on a symlink-capable filesystem"""
     # mktemp is not racy because symlink creation will fail if the
@@ -951,12 +945,6 @@
     except (OSError, AttributeError):
         return False
 
-def linkfunc(path, fallback):
-    '''return an is_link() function with default to fallback'''
-    if checklink(path):
-        return lambda x: os.path.islink(os.path.join(path, x))
-    return fallback
-
 _umask = os.umask(0)
 os.umask(_umask)