# HG changeset patch # User Alexis S. L. Carvalho # Date 2008-03-14 12:56:58 # Node ID bfd49ce0db6413a12051a8dc853528efe5651d5e # Parent 69c75d063c7a08180667a3234e8b0c886d0d3cf1 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). diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -63,6 +63,9 @@ class dirstate(object): 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 @@ class dirstate(object): 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)