Show More
@@ -69,7 +69,7 b' class ChangingFiles(object):' | |||||
69 | and self.copied_from_p2 == other.copied_from_p2 |
|
69 | and self.copied_from_p2 == other.copied_from_p2 | |
70 | ) |
|
70 | ) | |
71 |
|
71 | |||
72 | @property |
|
72 | @util.propertycache | |
73 | def added(self): |
|
73 | def added(self): | |
74 | """files actively added in the changeset |
|
74 | """files actively added in the changeset | |
75 |
|
75 | |||
@@ -83,6 +83,8 b' class ChangingFiles(object):' | |||||
83 | return frozenset(self._added) |
|
83 | return frozenset(self._added) | |
84 |
|
84 | |||
85 | def mark_added(self, filename): |
|
85 | def mark_added(self, filename): | |
|
86 | if 'added' in vars(self): | |||
|
87 | del self.added | |||
86 | self._added.add(filename) |
|
88 | self._added.add(filename) | |
87 | self.mark_touched(filename) |
|
89 | self.mark_touched(filename) | |
88 |
|
90 | |||
@@ -90,7 +92,7 b' class ChangingFiles(object):' | |||||
90 | for f in filenames: |
|
92 | for f in filenames: | |
91 | self.mark_added(f) |
|
93 | self.mark_added(f) | |
92 |
|
94 | |||
93 | @property |
|
95 | @util.propertycache | |
94 | def merged(self): |
|
96 | def merged(self): | |
95 | """files actively merged during a merge |
|
97 | """files actively merged during a merge | |
96 |
|
98 | |||
@@ -101,6 +103,8 b' class ChangingFiles(object):' | |||||
101 | return frozenset(self._merged) |
|
103 | return frozenset(self._merged) | |
102 |
|
104 | |||
103 | def mark_merged(self, filename): |
|
105 | def mark_merged(self, filename): | |
|
106 | if 'merged' in vars(self): | |||
|
107 | del self.merged | |||
104 | self._merged.add(filename) |
|
108 | self._merged.add(filename) | |
105 | self.mark_touched(filename) |
|
109 | self.mark_touched(filename) | |
106 |
|
110 | |||
@@ -108,7 +112,7 b' class ChangingFiles(object):' | |||||
108 | for f in filenames: |
|
112 | for f in filenames: | |
109 | self.mark_merged(f) |
|
113 | self.mark_merged(f) | |
110 |
|
114 | |||
111 | @property |
|
115 | @util.propertycache | |
112 | def removed(self): |
|
116 | def removed(self): | |
113 | """files actively removed by the changeset |
|
117 | """files actively removed by the changeset | |
114 |
|
118 | |||
@@ -145,6 +149,8 b' class ChangingFiles(object):' | |||||
145 | return frozenset(self._removed) |
|
149 | return frozenset(self._removed) | |
146 |
|
150 | |||
147 | def mark_removed(self, filename): |
|
151 | def mark_removed(self, filename): | |
|
152 | if 'removed' in vars(self): | |||
|
153 | del self.removed | |||
148 | self._removed.add(filename) |
|
154 | self._removed.add(filename) | |
149 | self.mark_touched(filename) |
|
155 | self.mark_touched(filename) | |
150 |
|
156 | |||
@@ -152,34 +158,40 b' class ChangingFiles(object):' | |||||
152 | for f in filenames: |
|
158 | for f in filenames: | |
153 | self.mark_removed(f) |
|
159 | self.mark_removed(f) | |
154 |
|
160 | |||
155 | @property |
|
161 | @util.propertycache | |
156 | def touched(self): |
|
162 | def touched(self): | |
157 | """files either actively modified, added or removed""" |
|
163 | """files either actively modified, added or removed""" | |
158 | return frozenset(self._touched) |
|
164 | return frozenset(self._touched) | |
159 |
|
165 | |||
160 | def mark_touched(self, filename): |
|
166 | def mark_touched(self, filename): | |
|
167 | if 'touched' in vars(self): | |||
|
168 | del self.touched | |||
161 | self._touched.add(filename) |
|
169 | self._touched.add(filename) | |
162 |
|
170 | |||
163 | def update_touched(self, filenames): |
|
171 | def update_touched(self, filenames): | |
164 | for f in filenames: |
|
172 | for f in filenames: | |
165 | self.mark_touched(f) |
|
173 | self.mark_touched(f) | |
166 |
|
174 | |||
167 | @property |
|
175 | @util.propertycache | |
168 | def copied_from_p1(self): |
|
176 | def copied_from_p1(self): | |
169 | return self._p1_copies.copy() |
|
177 | return self._p1_copies.copy() | |
170 |
|
178 | |||
171 | def mark_copied_from_p1(self, source, dest): |
|
179 | def mark_copied_from_p1(self, source, dest): | |
|
180 | if 'copied_from_p1' in vars(self): | |||
|
181 | del self.copied_from_p1 | |||
172 | self._p1_copies[dest] = source |
|
182 | self._p1_copies[dest] = source | |
173 |
|
183 | |||
174 | def update_copies_from_p1(self, copies): |
|
184 | def update_copies_from_p1(self, copies): | |
175 | for dest, source in copies.items(): |
|
185 | for dest, source in copies.items(): | |
176 | self.mark_copied_from_p1(source, dest) |
|
186 | self.mark_copied_from_p1(source, dest) | |
177 |
|
187 | |||
178 | @property |
|
188 | @util.propertycache | |
179 | def copied_from_p2(self): |
|
189 | def copied_from_p2(self): | |
180 | return self._p2_copies.copy() |
|
190 | return self._p2_copies.copy() | |
181 |
|
191 | |||
182 | def mark_copied_from_p2(self, source, dest): |
|
192 | def mark_copied_from_p2(self, source, dest): | |
|
193 | if 'copied_from_p2' in vars(self): | |||
|
194 | del self.copied_from_p2 | |||
183 | self._p2_copies[dest] = source |
|
195 | self._p2_copies[dest] = source | |
184 |
|
196 | |||
185 | def update_copies_from_p2(self, copies): |
|
197 | def update_copies_from_p2(self, copies): |
General Comments 0
You need to be logged in to leave comments.
Login now