Comments
Patch
@@ -589,6 +589,22 @@
l.append(r)
return l
+def descs(repo, subset, x):
+ """``descs(string)``
+ Search commit message for all individual words from the string.
+ Equivalent to a conjunction of multiple desc() calls.
+ The match is case-insensitive.
+ """
+ # i18n: "descs" is a keyword
+ dses = encoding.lower(getstring(x, _("descs requires a string"))).split()
+ l = []
+ for r in subset:
+ c = repo[r]
+ if util.all(ds in encoding.lower(c.description())
+ for ds in dses):
+ l.append(r)
+ return l
+
def _descendants(repo, subset, x, followfirst=False):
args = getset(repo, list(repo), x)
if not args:
@@ -1551,6 +1567,7 @@
"converted": converted,
"date": date,
"desc": desc,
+ "descs": descs,
"descendants": descendants,
"_firstdescendants": _firstdescendants,
"destination": destination,
@@ -329,6 +329,8 @@
$ log 'keyword(issue)'
6
$ log 'keyword("test a")'
+ $ log 'descs("0 1")'
+ 9
$ log 'limit(head(), 1)'
0
$ log 'matching(6)'