Comments
Patch
@@ -577,15 +577,20 @@
return [r for r in subset if dm(repo[r].date()[0])]
def desc(repo, subset, x):
- """``desc(string)``
- Search commit message for string. The match is case-insensitive.
+ """``desc(*string)``
+ Search commit message for one or multiple strings.
+ The match is case-insensitive.
"""
# i18n: "desc" is a keyword
- ds = encoding.lower(getstring(x, _("desc requires a string")))
+ dses = getargs(x, 1, -1, _("desc requires at least one argument"))
+ # i18n: "desc" is a keyword
+ dses = [encoding.lower(getstring(ds, _("desc requires string arguments")))
+ for ds in dses]
l = []
for r in subset:
c = repo[r]
- if ds in encoding.lower(c.description()):
+ if util.all(ds in encoding.lower(c.description())
+ for ds in dses):
l.append(r)
return l
@@ -329,6 +329,8 @@
$ log 'keyword(issue)'
6
$ log 'keyword("test a")'
+ $ log 'desc(0, 1)'
+ 9
$ log 'limit(head(), 1)'
0
$ log 'matching(6)'