comparison mercurial/fileset.py @ 38826:6371ab78c3b3

fileset: add phase to transform parsed tree This isn't strictly necessary, but I decided to just follow the strategy of the revset parsing.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 21 Jul 2018 16:11:36 +0900
parents 4fe8d1f077b8
children 48fc2a8af345
comparison
equal deleted inserted replaced
38825:8a9f6076e60c 38826:6371ab78c3b3
526 return False 526 return False
527 527
528 def match(ctx, expr, badfn=None): 528 def match(ctx, expr, badfn=None):
529 """Create a matcher for a single fileset expression""" 529 """Create a matcher for a single fileset expression"""
530 tree = filesetlang.parse(expr) 530 tree = filesetlang.parse(expr)
531 tree = filesetlang.analyze(tree)
531 mctx = matchctx(ctx, _buildstatus(ctx, tree), badfn=badfn) 532 mctx = matchctx(ctx, _buildstatus(ctx, tree), badfn=badfn)
532 return getmatch(mctx, tree) 533 return getmatch(mctx, tree)
533 534
534 def _buildstatus(ctx, tree, basectx=None): 535 def _buildstatus(ctx, tree, basectx=None):
535 # do we need status info? 536 # do we need status info?