changeset 6675:03a836ca6fde

Add a folding() method to dirstate The method returns True if the dirstate is on a case folding filesystem.
author Paul Moore <p.f.moore@gmail.com>
date Fri, 06 Jun 2008 08:29:16 +0100
parents 3101e30fd762
children 33045179d079
files mercurial/dirstate.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Wed Jun 11 11:00:01 2008 +0200
+++ b/mercurial/dirstate.py	Fri Jun 06 08:29:16 2008 +0100
@@ -66,12 +66,18 @@
         elif name == '_checkexec':
             self._checkexec = util.checkexec(self._root)
             return self._checkexec
+        elif name == '_folding':
+            self._folding = not util.checkfolding(self._join('.hg'))
+            return self._folding
         else:
             raise AttributeError, name
 
     def _join(self, f):
         return os.path.join(self._root, f)
 
+    def folding(self):
+        return self._folding
+
     def getcwd(self):
         cwd = os.getcwd()
         if cwd == self._root: return ''