Show More
@@ -814,15 +814,18 b' def date(repo, subset, x):' | |||
|
814 | 814 | @predicate('desc(string)', safe=True) |
|
815 | 815 | def desc(repo, subset, x): |
|
816 | 816 | """Search commit message for string. The match is case-insensitive. |
|
817 | ||
|
818 | If `string` starts with `re:`, the remainder of the string is treated as | |
|
819 | a regular expression. To match a substring that actually starts with `re:`, | |
|
820 | use the prefix `literal:`. | |
|
817 | 821 | """ |
|
818 | 822 | # i18n: "desc" is a keyword |
|
819 |
ds = |
|
|
820 | ||
|
821 | def matches(x): | |
|
822 | c = repo[x] | |
|
823 | return ds in encoding.lower(c.description()) | |
|
824 | ||
|
825 | return subset.filter(matches, condrepr=('<desc %r>', ds)) | |
|
823 | ds = getstring(x, _("desc requires a string")) | |
|
824 | ||
|
825 | kind, pattern, matcher = _substringmatcher(ds, casesensitive=False) | |
|
826 | ||
|
827 | return subset.filter(lambda r: matcher(repo[r].description()), | |
|
828 | condrepr=('<desc %r>', ds)) | |
|
826 | 829 | |
|
827 | 830 | def _descendants(repo, subset, x, followfirst=False): |
|
828 | 831 | roots = getset(repo, fullreposet(repo), x) |
General Comments 0
You need to be logged in to leave comments.
Login now