--- a/mercurial/fileset.py Sat Jul 21 17:13:34 2018 +0900
+++ b/mercurial/fileset.py Sat Jul 21 17:19:12 2018 +0900
@@ -50,6 +50,12 @@
return stringmatch(mctx, _getkindpat(x, y, matchmod.allpatternkinds,
_("pattern must be a string")))
+def patternsmatch(mctx, *xs):
+ allkinds = matchmod.allpatternkinds
+ patterns = [getpattern(x, allkinds, _("pattern must be a string"))
+ for x in xs]
+ return mctx.matcher(patterns)
+
def andmatch(mctx, x, y):
xm = getmatch(mctx, x)
ym = getmatch(mctx, y)
@@ -436,6 +442,7 @@
'string': stringmatch,
'symbol': stringmatch,
'kindpat': kindpatmatch,
+ 'patterns': patternsmatch,
'and': andmatch,
'or': ormatch,
'minus': minusmatch,