# HG changeset patch # User Yuya Nishihara # Date 1528613547 -32400 # Node ID ec0cee4c1fff356c903bc03bed169eeb9fca5317 # Parent 2d487b9cac0729d5911af6ff02bed86cca3e29ad match: resolve 'set:' patterns first in _buildmatch() This just makes the next patch less complicated. The order of 'set:' and 'subinclude:' expansion doesn't matter. diff -r 2d487b9cac07 -r ec0cee4c1fff mercurial/match.py --- a/mercurial/match.py Sun Jun 10 15:47:58 2018 +0900 +++ b/mercurial/match.py Sun Jun 10 15:52:27 2018 +0900 @@ -828,6 +828,10 @@ globsuffix is appended to the regexp of globs.''' matchfuncs = [] + fset, kindpats = _expandsets(kindpats, ctx, listsubrepos) + if fset: + matchfuncs.append(fset.__contains__) + subincludes, kindpats = _expandsubinclude(kindpats, root) if subincludes: submatchers = {} @@ -844,10 +848,6 @@ return False matchfuncs.append(matchsubinclude) - fset, kindpats = _expandsets(kindpats, ctx, listsubrepos) - if fset: - matchfuncs.append(fset.__contains__) - regex = '' if kindpats: regex, mf = _buildregexmatch(kindpats, globsuffix)