##// END OF EJS Templates
manifest: rewrite filesnotin to not make superfluous manifest copies...
Augie Fackler -
r44768:bbecb6d8 default
parent child Browse files
Show More
@@ -23,6 +23,7 b' from .pycompat import getattr'
23 from . import (
23 from . import (
24 encoding,
24 encoding,
25 error,
25 error,
26 match as matchmod,
26 mdiff,
27 mdiff,
27 pathutil,
28 pathutil,
28 policy,
29 policy,
@@ -482,17 +483,11 b' class manifestdict(object):'
482
483
483 def filesnotin(self, m2, match=None):
484 def filesnotin(self, m2, match=None):
484 '''Set of files in this manifest that are not in the other'''
485 '''Set of files in this manifest that are not in the other'''
485 if match:
486 if match is not None:
486 m1 = self.matches(match)
487 match = matchmod.badmatch(match, lambda path, msg: None)
487 m2 = m2.matches(match)
488 sm2 = set(m2.walk(match))
488 return m1.filesnotin(m2)
489 return {f for f in self.walk(match) if f not in sm2}
489 diff = self.diff(m2)
490 return {f for f in self if f not in m2}
490 files = set(
491 filepath
492 for filepath, hashflags in pycompat.iteritems(diff)
493 if hashflags[1][0] is None
494 )
495 return files
496
491
497 @propertycache
492 @propertycache
498 def _dirs(self):
493 def _dirs(self):
General Comments 0
You need to be logged in to leave comments. Login now