##// END OF EJS Templates
revset: stop lowercasing the regex pattern for 'author'...
Matt Harbison -
r30782:db38cfc7 default
parent child Browse files
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 = encoding.lower(getstring(x, _("author requires a string")))
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(encoding.lower(repo[x].user())),
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)
@@ -865,6 +865,17 b' test ancestors'
865 7
865 7
866 8
866 8
867 9
867 9
868 $ log 'author(r"re:\S")'
869 0
870 1
871 2
872 3
873 4
874 5
875 6
876 7
877 8
878 9
868 $ log 'branch(é)'
879 $ log 'branch(é)'
869 8
880 8
870 9
881 9
General Comments 0
You need to be logged in to leave comments. Login now