# HG changeset patch # User Paul Moore # Date 1212737356 -3600 # Node ID 03a836ca6fdede24dc4f06c4cceb5520ffdc94be # Parent 3101e30fd762db36cb82566cfef8b4f2506baaec Add a folding() method to dirstate The method returns True if the dirstate is on a case folding filesystem. diff -r 3101e30fd762 -r 03a836ca6fde mercurial/dirstate.py --- 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 ''