Mercurial > public > mercurial-scm > hg-stable
diff mercurial/fileset.py @ 38869:7e7e2b2ff284
fileset: add stub for weight-based optimization
The main purpose of this change is to group basic patterns, which can be
mapped to a plain matcher. I'm not so interested in a weight of each function.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 21 Jul 2018 15:52:26 +0900 |
parents | 3ea6ce609747 |
children | bfd5def3fe02 |
line wrap: on
line diff
--- a/mercurial/fileset.py Sat Jul 21 16:16:44 2018 +0900 +++ b/mercurial/fileset.py Sat Jul 21 15:52:26 2018 +0900 @@ -524,6 +524,7 @@ """Create a matcher for a single fileset expression""" tree = filesetlang.parse(expr) tree = filesetlang.analyze(tree) + tree = filesetlang.optimize(tree) mctx = matchctx(ctx, _buildstatus(ctx, tree), badfn=badfn) return getmatch(mctx, tree)