mercurial/merge.py
changeset 3105 ef4e5d05bac4
parent 3104 e6818b0b8154
parent 3098 fe9b13e35e46
child 3106 7c7469d41ade
equal deleted inserted replaced
3104:e6818b0b8154 3105:ef4e5d05bac4
     6 # of the GNU General Public License, incorporated herein by reference.
     6 # of the GNU General Public License, incorporated herein by reference.
     7 
     7 
     8 from node import *
     8 from node import *
     9 from i18n import gettext as _
     9 from i18n import gettext as _
    10 from demandload import *
    10 from demandload import *
    11 demandload(globals(), "util os tempfile")
    11 demandload(globals(), "errno util os tempfile")
    12 
    12 
    13 def fmerge(f, local, other, ancestor):
    13 def fmerge(f, local, other, ancestor):
    14     """merge executable flags"""
    14     """merge executable flags"""
    15     a, b, c = ancestor.execf(f), local.execf(f), other.execf(f)
    15     a, b, c = ancestor.execf(f), local.execf(f), other.execf(f)
    16     return ((a^b) | (a^c)) ^ a
    16     return ((a^b) | (a^c)) ^ a
   163             if not queued and m1.execf(f) != m2.execf(f):
   163             if not queued and m1.execf(f) != m2.execf(f):
   164                 if overwrite:
   164                 if overwrite:
   165                     repo.ui.debug(_(" updating permissions for %s\n") % f)
   165                     repo.ui.debug(_(" updating permissions for %s\n") % f)
   166                     action.append((f, "e", m2.execf(f)))
   166                     action.append((f, "e", m2.execf(f)))
   167                 else:
   167                 else:
   168                     if fmerge(f, m1, m2, ma) != m1.execf(f):
   168                     mode = fmerge(f, m1, m2, ma)
       
   169                     if mode != m1.execf(f):
   169                         repo.ui.debug(_(" updating permissions for %s\n")
   170                         repo.ui.debug(_(" updating permissions for %s\n")
   170                                       % f)
   171                                       % f)
   171                         action.append((f, "e", m2.execf(f)))
   172                         action.append((f, "e", m2.execf(f)))
   172             del m2[f]
   173             del m2[f]
   173         elif f in ma:
   174         elif f in ma: