##// END OF EJS Templates
fsmonitor: use new dirstate APIs (issue6728)...
Raphaël Gomès -
r50363:2905b78f stable
parent child Browse files
Show More
@@ -117,6 +117,7 b' import weakref'
117
117
118 from mercurial.i18n import _
118 from mercurial.i18n import _
119 from mercurial.node import hex
119 from mercurial.node import hex
120
120 from mercurial.pycompat import open
121 from mercurial.pycompat import open
121 from mercurial import (
122 from mercurial import (
122 context,
123 context,
@@ -131,6 +132,9 b' from mercurial import ('
131 scmutil,
132 scmutil,
132 util,
133 util,
133 )
134 )
135
136 # no-check-code because we're accessing private information only public in pure
137 from mercurial.pure import parsers
134 from mercurial import match as matchmod
138 from mercurial import match as matchmod
135 from mercurial.utils import (
139 from mercurial.utils import (
136 hashutil,
140 hashutil,
@@ -332,10 +336,22 b' def overridewalk(orig, self, match, subr'
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
@@ -30,6 +30,7 b' New errors are not allowed. Warnings are'
30 Skipping contrib/packaging/hgpackaging/pyoxidizer.py it has no-che?k-code (glob)
30 Skipping contrib/packaging/hgpackaging/pyoxidizer.py it has no-che?k-code (glob)
31 Skipping contrib/packaging/hgpackaging/util.py it has no-che?k-code (glob)
31 Skipping contrib/packaging/hgpackaging/util.py it has no-che?k-code (glob)
32 Skipping contrib/packaging/hgpackaging/wix.py it has no-che?k-code (glob)
32 Skipping contrib/packaging/hgpackaging/wix.py it has no-che?k-code (glob)
33 Skipping hgext/fsmonitor/__init__.py it has no-che?k-code (glob)
33 Skipping i18n/polib.py it has no-che?k-code (glob)
34 Skipping i18n/polib.py it has no-che?k-code (glob)
34 Skipping mercurial/statprof.py it has no-che?k-code (glob)
35 Skipping mercurial/statprof.py it has no-che?k-code (glob)
35 Skipping tests/testlib/badserverext.py it has no-che?k-code (glob)
36 Skipping tests/testlib/badserverext.py it has no-che?k-code (glob)
General Comments 0
You need to be logged in to leave comments. Login now