fix localrepo.status when dealing with x-bit changes
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 10 Oct 2006 00:02:30 +0200
changeset 3322 a1aad25ccc3e
parent 3321 455109df3669
child 3323 b7a46cbf3f59
child 3330 49966b5ab16f
fix localrepo.status when dealing with x-bit changes
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Oct 09 21:48:44 2006 +0200
+++ b/mercurial/localrepo.py	Tue Oct 10 00:02:30 2006 +0200
@@ -706,7 +706,7 @@
 
         def mfmatches(node):
             change = self.changelog.read(node)
-            mf = dict(self.manifest.read(change[0]))
+            mf = self.manifest.read(change[0]).copy()
             for fn in mf.keys():
                 if not match(fn):
                     del mf[fn]
@@ -751,9 +751,11 @@
             else:
                 # we are comparing working dir against non-parent
                 # generate a pseudo-manifest for the working dir
+                # XXX: create it in dirstate.py ?
                 mf2 = mfmatches(self.dirstate.parents()[0])
                 for f in lookup + modified + added:
                     mf2[f] = ""
+                    mf2.set(f, execf=util.is_exec(self.wjoin(f), mf2.execf(f)))
                 for f in removed:
                     if f in mf2:
                         del mf2[f]
@@ -771,7 +773,8 @@
             mf2keys.sort()
             for fn in mf2keys:
                 if mf1.has_key(fn):
-                    if mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1)):
+                    if mf1.flags(fn) != mf2.flags(fn) or \
+                       (mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1))):
                         modified.append(fn)
                     elif list_clean:
                         clean.append(fn)