mercurial/fileset.py
changeset 38828 3ea6ce609747
parent 38827 48fc2a8af345
child 38829 7e7e2b2ff284
equal deleted inserted replaced
38827:48fc2a8af345 38828:3ea6ce609747
    59 
    59 
    60 def minusmatch(mctx, x, y):
    60 def minusmatch(mctx, x, y):
    61     xm = getmatch(mctx, x)
    61     xm = getmatch(mctx, x)
    62     ym = getmatch(mctx, y)
    62     ym = getmatch(mctx, y)
    63     return matchmod.differencematcher(xm, ym)
    63     return matchmod.differencematcher(xm, ym)
    64 
       
    65 def negatematch(mctx, x):
       
    66     raise error.ParseError(_("can't use negate operator in this context"))
       
    67 
    64 
    68 def listmatch(mctx, *xs):
    65 def listmatch(mctx, *xs):
    69     raise error.ParseError(_("can't use a list in this context"),
    66     raise error.ParseError(_("can't use a list in this context"),
    70                            hint=_('see \'hg help "filesets.x or y"\''))
    67                            hint=_('see \'hg help "filesets.x or y"\''))
    71 
    68 
   434     'symbol': stringmatch,
   431     'symbol': stringmatch,
   435     'kindpat': kindpatmatch,
   432     'kindpat': kindpatmatch,
   436     'and': andmatch,
   433     'and': andmatch,
   437     'or': ormatch,
   434     'or': ormatch,
   438     'minus': minusmatch,
   435     'minus': minusmatch,
   439     'negate': negatematch,
       
   440     'list': listmatch,
   436     'list': listmatch,
   441     'not': notmatch,
   437     'not': notmatch,
   442     'func': func,
   438     'func': func,
   443 }
   439 }
   444 
   440