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.
--- 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)