equal
deleted
inserted
replaced
40 |
40 |
41 def getmatch(mctx, x): |
41 def getmatch(mctx, x): |
42 if not x: |
42 if not x: |
43 raise error.ParseError(_("missing argument")) |
43 raise error.ParseError(_("missing argument")) |
44 return methods[x[0]](mctx, *x[1:]) |
44 return methods[x[0]](mctx, *x[1:]) |
|
45 |
|
46 def getmatchwithstatus(mctx, x, hint): |
|
47 return getmatch(mctx, x) |
45 |
48 |
46 def stringmatch(mctx, x): |
49 def stringmatch(mctx, x): |
47 return mctx.matcher([x]) |
50 return mctx.matcher([x]) |
48 |
51 |
49 def kindpatmatch(mctx, x, y): |
52 def kindpatmatch(mctx, x, y): |
441 predrepr=('subrepo(%r)', pat)) |
444 predrepr=('subrepo(%r)', pat)) |
442 else: |
445 else: |
443 return mctx.predicate(sstate.__contains__, predrepr='subrepo') |
446 return mctx.predicate(sstate.__contains__, predrepr='subrepo') |
444 |
447 |
445 methods = { |
448 methods = { |
|
449 'withstatus': getmatchwithstatus, |
446 'string': stringmatch, |
450 'string': stringmatch, |
447 'symbol': stringmatch, |
451 'symbol': stringmatch, |
448 'kindpat': kindpatmatch, |
452 'kindpat': kindpatmatch, |
449 'patterns': patternsmatch, |
453 'patterns': patternsmatch, |
450 'and': andmatch, |
454 'and': andmatch, |