changeset 6257:bfd49ce0db64

dirstate: ignore mode changes if the fs does not supports the exec bit This can make a difference when e.g. the repo is exported through NFS (which support exec bits) and CIFS (which does not).
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 14 Mar 2008 09:56:58 -0300
parents 69c75d063c7a
children c24f4b3f156b
files mercurial/dirstate.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Fri Mar 14 09:56:58 2008 -0300
+++ b/mercurial/dirstate.py	Fri Mar 14 09:56:58 2008 -0300
@@ -63,6 +63,9 @@
         elif name == '_slash':
             self._slash = self._ui.configbool('ui', 'slash') and os.sep != '/'
             return self._slash
+        elif name == '_checkexec':
+            self._checkexec = util.checkexec(self._root)
+            return self._checkexec
         else:
             raise AttributeError, name
 
@@ -578,8 +581,9 @@
             if type_ == 'n':
                 if not st:
                     st = lstat(_join(fn))
-                if (size >= 0 and (size != st.st_size
-                                   or (mode ^ st.st_mode) & 0100)
+                if (size >= 0 and
+                    (size != st.st_size
+                     or ((mode ^ st.st_mode) & 0100 and self._checkexec))
                     or size == -2
                     or fn in self._copymap):
                     madd(fn)