Show More
@@ -814,15 +814,18 b' def date(repo, subset, x):' | |||||
814 | @predicate('desc(string)', safe=True) |
|
814 | @predicate('desc(string)', safe=True) | |
815 | def desc(repo, subset, x): |
|
815 | def desc(repo, subset, x): | |
816 | """Search commit message for string. The match is case-insensitive. |
|
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 | # i18n: "desc" is a keyword |
|
822 | # i18n: "desc" is a keyword | |
819 |
ds = |
|
823 | ds = getstring(x, _("desc requires a string")) | |
820 |
|
824 | |||
821 | def matches(x): |
|
825 | kind, pattern, matcher = _substringmatcher(ds, casesensitive=False) | |
822 | c = repo[x] |
|
826 | ||
823 | return ds in encoding.lower(c.description()) |
|
827 | return subset.filter(lambda r: matcher(repo[r].description()), | |
824 |
|
828 | condrepr=('<desc %r>', ds)) | ||
825 | return subset.filter(matches, condrepr=('<desc %r>', ds)) |
|
|||
826 |
|
829 | |||
827 | def _descendants(repo, subset, x, followfirst=False): |
|
830 | def _descendants(repo, subset, x, followfirst=False): | |
828 | roots = getset(repo, fullreposet(repo), x) |
|
831 | roots = getset(repo, fullreposet(repo), x) |
General Comments 0
You need to be logged in to leave comments.
Login now