mercurial/localrepo.py
changeset 6158 23ffe82615d8
parent 6139 989467e8e3a9
child 6181 d500aeb8092e
--- a/mercurial/localrepo.py	Thu Feb 21 16:22:31 2008 -0300
+++ b/mercurial/localrepo.py	Thu Feb 21 16:22:31 2008 -0300
@@ -1003,8 +1003,15 @@
                     fixup = []
                     # do a full compare of any files that might have changed
                     ctx = self.changectx()
+                    mexec = lambda f: 'x' in ctx.fileflags(f)
+                    mlink = lambda f: 'l' in ctx.fileflags(f)
+                    is_exec = util.execfunc(self.root, mexec)
+                    is_link = util.linkfunc(self.root, mlink)
+                    def flags(f):
+                        return is_link(f) and 'l' or is_exec(f) and 'x' or ''
                     for f in lookup:
-                        if f not in ctx or ctx[f].cmp(self.wread(f)):
+                        if (f not in ctx or flags(f) != ctx.fileflags(f)
+                            or ctx[f].cmp(self.wread(f))):
                             modified.append(f)
                         else:
                             fixup.append(f)