mercurial/context.py
branchstable
changeset 23085 e9165c18f8df
parent 23080 c586cb50872b
child 23110 692bde7f486d
equal deleted inserted replaced
23084:3ef893520a85 23085:e9165c18f8df
   119         mf1 = other._manifestmatches(match, s)
   119         mf1 = other._manifestmatches(match, s)
   120         mf2 = self._manifestmatches(match, s)
   120         mf2 = self._manifestmatches(match, s)
   121 
   121 
   122         modified, added, clean = [], [], []
   122         modified, added, clean = [], [], []
   123         deleted, unknown, ignored = s[3], s[4], s[5]
   123         deleted, unknown, ignored = s[3], s[4], s[5]
       
   124         deletedset = set(deleted)
   124         withflags = mf1.withflags() | mf2.withflags()
   125         withflags = mf1.withflags() | mf2.withflags()
   125         for fn, mf2node in mf2.iteritems():
   126         for fn, mf2node in mf2.iteritems():
   126             if fn in mf1:
   127             if fn in mf1:
   127                 if (fn not in deleted and
   128                 if (fn not in deletedset and
   128                     ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or
   129                     ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or
   129                      (mf1[fn] != mf2node and
   130                      (mf1[fn] != mf2node and
   130                       (mf2node or self[fn].cmp(other[fn]))))):
   131                       (mf2node or self[fn].cmp(other[fn]))))):
   131                     modified.append(fn)
   132                     modified.append(fn)
   132                 elif listclean:
   133                 elif listclean:
   133                     clean.append(fn)
   134                     clean.append(fn)
   134                 del mf1[fn]
   135                 del mf1[fn]
   135             elif fn not in deleted:
   136             elif fn not in deletedset:
   136                 added.append(fn)
   137                 added.append(fn)
   137         removed = mf1.keys()
   138         removed = mf1.keys()
   138         if removed:
   139         if removed:
   139             # need to filter files if they are already reported as removed
   140             # need to filter files if they are already reported as removed
   140             unknown = [fn for fn in unknown if fn not in mf1]
   141             unknown = [fn for fn in unknown if fn not in mf1]