# HG changeset patch # User Yuya Nishihara # Date 1532157210 -32400 # Node ID 48fc2a8af345d819854f8cbd15cd26049750ee92 # Parent 6371ab78c3b374821f3bef156fe2defe5a1c7946 fileset: drop 'group' node from tree to be evaluated This helps rewriting a parsed tree. diff -r 6371ab78c3b3 -r 48fc2a8af345 mercurial/fileset.py --- a/mercurial/fileset.py Sat Jul 21 16:11:36 2018 +0900 +++ b/mercurial/fileset.py Sat Jul 21 16:13:30 2018 +0900 @@ -438,7 +438,6 @@ 'minus': minusmatch, 'negate': negatematch, 'list': listmatch, - 'group': getmatch, 'not': notmatch, 'func': func, } diff -r 6371ab78c3b3 -r 48fc2a8af345 mercurial/filesetlang.py --- a/mercurial/filesetlang.py Sat Jul 21 16:11:36 2018 +0900 +++ b/mercurial/filesetlang.py Sat Jul 21 16:13:30 2018 +0900 @@ -142,7 +142,9 @@ getsymbol(x[1]) # kind must be a symbol t = _analyze(x[2]) return (op, x[1], t) - if op in {'group', 'not', 'negate'}: + if op == 'group': + return _analyze(x[1]) + if op in {'not', 'negate'}: t = _analyze(x[1]) return (op, t) if op in {'and', 'minus'}: diff -r 6371ab78c3b3 -r 48fc2a8af345 mercurial/minifileset.py --- a/mercurial/minifileset.py Sat Jul 21 16:11:36 2018 +0900 +++ b/mercurial/minifileset.py Sat Jul 21 16:13:30 2018 +0900 @@ -49,8 +49,6 @@ return lambda n, s: func1(n, s) and func2(n, s) elif op == 'not': return lambda n, s: not _compile(tree[1])(n, s) - elif op == 'group': - return _compile(tree[1]) elif op == 'func': symbols = { 'all': lambda n, s: True, diff -r 6371ab78c3b3 -r 48fc2a8af345 tests/test-fileset.t --- a/tests/test-fileset.t Sat Jul 21 16:11:36 2018 +0900 +++ b/tests/test-fileset.t Sat Jul 21 16:13:30 2018 +0900 @@ -173,14 +173,13 @@ (or (symbol 'a1') (symbol 'a2') - (group - (and - (func - (symbol 'grep') - (string 'b')) - (func - (symbol 'clean') - None)))) + (and + (func + (symbol 'grep') + (string 'b')) + (func + (symbol 'clean') + None))) * matcher: ,