##// END OF EJS Templates
dirstate-item: use the properties in dirstatemap...
marmoute -
r48331:b8013cb7 default
parent child Browse files
Show More
@@ -219,13 +219,13 b' class dirstatemap(object):'
219 219 # backup the previous state
220 220 if entry.merged: # merge
221 221 size = NONNORMAL
222 elif entry[0] == b'n' and entry.from_p2:
222 elif entry.from_p2:
223 223 size = FROM_P2
224 224 self.otherparentset.add(f)
225 225 if size == 0:
226 226 self.copymap.pop(f, None)
227 227
228 if entry is not None and entry[0] != b'r' and "_dirs" in self.__dict__:
228 if entry is not None and not entry.removed and "_dirs" in self.__dict__:
229 229 self._dirs.delpath(f)
230 230 if entry is None and "_alldirs" in self.__dict__:
231 231 self._alldirs.addpath(f)
@@ -260,8 +260,10 b' class dirstatemap(object):'
260 260 def clearambiguoustimes(self, files, now):
261 261 for f in files:
262 262 e = self.get(f)
263 if e is not None and e[0] == b'n' and e[3] == now:
264 self._map[f] = DirstateItem(e[0], e[1], e[2], AMBIGUOUS_TIME)
263 if e is not None and e.need_delay(now):
264 self._map[f] = DirstateItem(
265 e.state, e.mode, e.size, AMBIGUOUS_TIME
266 )
265 267 self.nonnormalset.add(f)
266 268
267 269 def nonnormalentries(self):
@@ -272,9 +274,9 b' class dirstatemap(object):'
272 274 nonnorm = set()
273 275 otherparent = set()
274 276 for fname, e in pycompat.iteritems(self._map):
275 if e[0] != b'n' or e[3] == AMBIGUOUS_TIME:
277 if e.state != b'n' or e.mtime == AMBIGUOUS_TIME:
276 278 nonnorm.add(fname)
277 if e[0] == b'n' and e[2] == FROM_P2:
279 if e.from_p2:
278 280 otherparent.add(fname)
279 281 return nonnorm, otherparent
280 282
@@ -295,7 +297,7 b' class dirstatemap(object):'
295 297 f = {}
296 298 normcase = util.normcase
297 299 for name, s in pycompat.iteritems(self._map):
298 if s[0] != b'r':
300 if not s.removed:
299 301 f[normcase(name)] = name
300 302 f[b'.'] = b'.' # prevents useless util.fspath() invocation
301 303 return f
General Comments 0
You need to be logged in to leave comments. Login now