update: synchronize permissions in the dirstate (issue1473) stable
authorMatt Mackall <mpm@selenic.com>
Wed, 30 Jun 2010 17:34:20 -0500
branchstable
changeset 11466 ad27428c59ce
parent 11465 ace5bd98bee3
child 11467 6b836d5c8c9e
update: synchronize permissions in the dirstate (issue1473) fix by Benoit, updated by mpm to not affect all clean files
mercurial/merge.py
--- a/mercurial/merge.py	Thu Jun 24 15:18:47 2010 +0100
+++ b/mercurial/merge.py	Wed Jun 30 17:34:20 2010 -0500
@@ -182,7 +182,9 @@
             rflags = fmerge(f, f, f)
             a = ma.get(f, nullid)
             if n == m2[f] or m2[f] == a: # same or local newer
-                if m1.flags(f) != rflags:
+                # is file locally modified or flags need changing?
+                # dirstate flags may need to be made current
+                if m1.flags(f) != rflags or n[20:]:
                     act("update permissions", "e", f, rflags)
             elif n == a: # remote newer
                 act("remote is newer", "g", f, rflags)