equal
deleted
inserted
replaced
21 ) |
21 ) |
22 from .pycompat import getattr |
22 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, |
29 pycompat, |
30 pycompat, |
30 revlog, |
31 revlog, |
480 def keys(self): |
481 def keys(self): |
481 return list(self.iterkeys()) |
482 return list(self.iterkeys()) |
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): |
499 return pathutil.dirs(self) |
494 return pathutil.dirs(self) |
500 |
495 |