Mercurial > hg-stable
changeset 38580:ec0cee4c1fff
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 10 Jun 2018 15:52:27 +0900 |
parents | 2d487b9cac07 |
children | 9f9ffe5f687c |
files | mercurial/match.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)