496 return (f for f in self.subset |
496 return (f for f in self.subset |
497 if (f in self.ctx and f not in removed) or f in unknown) |
497 if (f in self.ctx and f not in removed) or f in unknown) |
498 def narrow(self, files): |
498 def narrow(self, files): |
499 return matchctx(self.ctx, self.filter(files), self._status) |
499 return matchctx(self.ctx, self.filter(files), self._status) |
500 |
500 |
|
501 class fullmatchctx(matchctx): |
|
502 """A match context where any files in any revisions should be valid""" |
|
503 |
|
504 def __init__(self, ctx, subset=None, status=None): |
|
505 super(fullmatchctx, self).__init__(ctx, subset, status) |
|
506 |
501 def _intree(funcs, tree): |
507 def _intree(funcs, tree): |
502 if isinstance(tree, tuple): |
508 if isinstance(tree, tuple): |
503 if tree[0] == 'func' and tree[1][0] == 'symbol': |
509 if tree[0] == 'func' and tree[1][0] == 'symbol': |
504 if tree[1][1] in funcs: |
510 if tree[1][1] in funcs: |
505 return True |
511 return True |
527 subset.extend(c) |
533 subset.extend(c) |
528 else: |
534 else: |
529 status = None |
535 status = None |
530 subset = list(ctx.walk(ctx.match([]))) |
536 subset = list(ctx.walk(ctx.match([]))) |
531 |
537 |
532 return getset(matchctx(ctx, subset, status), tree) |
538 return getset(fullmatchctx(ctx, subset, status), tree) |
533 |
539 |
534 def prettyformat(tree): |
540 def prettyformat(tree): |
535 return parser.prettyformat(tree, ('string', 'symbol')) |
541 return parser.prettyformat(tree, ('string', 'symbol')) |
536 |
542 |
537 def loadpredicate(ui, extname, registrarobj): |
543 def loadpredicate(ui, extname, registrarobj): |