330 dmap = self._map |
334 dmap = self._map |
331 if util.safehasattr(dmap, b'_map'): |
335 if util.safehasattr(dmap, b'_map'): |
332 # for better performance, directly access the inner dirstate map if the |
336 # for better performance, directly access the inner dirstate map if the |
333 # standard dirstate implementation is in use. |
337 # standard dirstate implementation is in use. |
334 dmap = dmap._map |
338 dmap = dmap._map |
|
339 |
|
340 has_mtime = parsers.DIRSTATE_V2_HAS_MTIME |
|
341 mtime_is_ambiguous = parsers.DIRSTATE_V2_MTIME_SECOND_AMBIGUOUS |
|
342 mask = has_mtime | mtime_is_ambiguous |
|
343 |
|
344 # All entries that may not be clean |
335 nonnormalset = { |
345 nonnormalset = { |
336 f |
346 f |
337 for f, e in self._map.items() |
347 for f, e in self._map.items() |
338 if e._v1_state() != b"n" or e._v1_mtime() == -1 |
348 if not e.maybe_clean |
|
349 # same as "not has_time or has_ambiguous_time", but factored to only |
|
350 # need a single access to flags for performance. |
|
351 # `mask` removes all irrelevant bits, then we flip the `mtime` bit so |
|
352 # its `true` value is NOT having a mtime, then check if either bit |
|
353 # is set. |
|
354 or bool((e.v2_data()[0] & mask) ^ has_mtime) |
339 } |
355 } |
340 |
356 |
341 copymap = self._map.copymap |
357 copymap = self._map.copymap |
342 getkind = stat.S_IFMT |
358 getkind = stat.S_IFMT |
343 dirkind = stat.S_IFDIR |
359 dirkind = stat.S_IFDIR |