Show More
@@ -556,9 +556,9 b' def author(repo, subset, x):' | |||||
556 | """Alias for ``user(string)``. |
|
556 | """Alias for ``user(string)``. | |
557 | """ |
|
557 | """ | |
558 | # i18n: "author" is a keyword |
|
558 | # i18n: "author" is a keyword | |
559 |
n = |
|
559 | n = getstring(x, _("author requires a string")) | |
560 | kind, pattern, matcher = _substringmatcher(n) |
|
560 | kind, pattern, matcher = _substringmatcher(n, casesensitive=False) | |
561 |
return subset.filter(lambda x: matcher( |
|
561 | return subset.filter(lambda x: matcher(repo[x].user()), | |
562 | condrepr=('<user %r>', n)) |
|
562 | condrepr=('<user %r>', n)) | |
563 |
|
563 | |||
564 | @predicate('bisect(string)', safe=True) |
|
564 | @predicate('bisect(string)', safe=True) | |
@@ -2249,10 +2249,15 b' def subrepo(repo, subset, x):' | |||||
2249 |
|
2249 | |||
2250 | return subset.filter(matches, condrepr=('<subrepo %r>', pat)) |
|
2250 | return subset.filter(matches, condrepr=('<subrepo %r>', pat)) | |
2251 |
|
2251 | |||
2252 | def _substringmatcher(pattern): |
|
2252 | def _substringmatcher(pattern, casesensitive=True): | |
2253 |
kind, pattern, matcher = util.stringmatcher(pattern |
|
2253 | kind, pattern, matcher = util.stringmatcher(pattern, | |
|
2254 | casesensitive=casesensitive) | |||
2254 | if kind == 'literal': |
|
2255 | if kind == 'literal': | |
2255 | matcher = lambda s: pattern in s |
|
2256 | if not casesensitive: | |
|
2257 | pattern = encoding.lower(pattern) | |||
|
2258 | matcher = lambda s: pattern in encoding.lower(s) | |||
|
2259 | else: | |||
|
2260 | matcher = lambda s: pattern in s | |||
2256 | return kind, pattern, matcher |
|
2261 | return kind, pattern, matcher | |
2257 |
|
2262 | |||
2258 | @predicate('tag([name])', safe=True) |
|
2263 | @predicate('tag([name])', safe=True) |
General Comments 0
You need to be logged in to leave comments.
Login now