##// END OF EJS Templates
context: add _buildstatus method...
Sean Farley -
r21471:90aff492 default
parent child Browse files
Show More
@@ -78,6 +78,31 b' class basectx(object):'
78 del mf[fn]
78 del mf[fn]
79 return mf
79 return mf
80
80
81 def _buildstatus(self, other, s, match, listignored, listclean,
82 listunknown):
83 """build a status with respect to another context"""
84 mf1 = other._manifestmatches(match, s)
85 mf2 = self._manifestmatches(match, s)
86
87 modified, added, clean = [], [], []
88 deleted, unknown, ignored = s[3], [], []
89 withflags = mf1.withflags() | mf2.withflags()
90 for fn, mf2node in mf2.iteritems():
91 if fn in mf1:
92 if (fn not in deleted and
93 ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or
94 (mf1[fn] != mf2node and
95 (mf2node or self[fn].cmp(other[fn]))))):
96 modified.append(fn)
97 elif listclean:
98 clean.append(fn)
99 del mf1[fn]
100 elif fn not in deleted:
101 added.append(fn)
102 removed = mf1.keys()
103
104 return [modified, added, removed, deleted, unknown, ignored, clean]
105
81 @propertycache
106 @propertycache
82 def substate(self):
107 def substate(self):
83 return subrepo.state(self, self._repo.ui)
108 return subrepo.state(self, self._repo.ui)
General Comments 0
You need to be logged in to leave comments. Login now